--- /srv/rebuilderd/tmp/rebuilderdbvhG0P/inputs/libgtsam-doc_4.2.0+dfsg-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdbvhG0P/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 75824 2024-01-09 05:51:35.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 14530704 2024-01-09 05:51:35.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -124,773 +124,768 @@ │ │ │ │ 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.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/a00011_source.html │ │ │ │ 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.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00026_source.html │ │ │ │ -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/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/a00056.html │ │ │ │ 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/a00068.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00071.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00071_source.html │ │ │ │ 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_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ │ +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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00122.js │ │ │ │ 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/a00125_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00128.js │ │ │ │ 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.js │ │ │ │ +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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00149.js │ │ │ │ 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/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/a00182_source.html │ │ │ │ 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/a00191.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00191.js │ │ │ │ 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/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/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/a00209.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00209_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00212.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00212.js │ │ │ │ -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/a00224.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00224_source.html │ │ │ │ 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/a00233.js │ │ │ │ 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_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/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_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00266.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00266_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00263.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/a00281_source.html │ │ │ │ -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/a00278.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00278.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00278_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00284.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00284.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00284_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00290.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/a00296.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00296.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00296_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/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/a00308.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00308_source.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/a00317_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00320.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/a00326.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00326_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00329.html │ │ │ │ -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/a00335_source.html │ │ │ │ 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/a00344.js │ │ │ │ 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/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/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/a00374_source.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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00398.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00398_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00401.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/a00407.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00407.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00407_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00410.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00410.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00410_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00416.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00416.js │ │ │ │ +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_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ │ +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/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/a00440.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00440_source.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/a00446.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00446_source.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/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/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/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/a00470.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00470_source.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/a00476.html │ │ │ │ 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/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/a00503.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00503_source.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/a00509.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00509_source.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/a00515.js │ │ │ │ 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/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/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/a00545.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00545_source.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/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/a00563.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00563_source.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/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.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/a00587_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00590.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00590_source.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/a00596.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00599.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00599_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00602.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00602_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00605.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00605.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00605_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00608.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00608.js │ │ │ │ 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/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/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/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.js │ │ │ │ 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_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00665.html │ │ │ │ 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.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_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/a00695.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00695_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00698.html │ │ │ │ -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/a00707.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00707.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00704_source.html │ │ │ │ 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/a00713.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00713_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00716.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00716.js │ │ │ │ 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/a00722_source.html │ │ │ │ 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/a00731.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00731_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00734.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00734.js │ │ │ │ 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/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 │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00758.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00758_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00761.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00761.js │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00761_source.html │ │ │ │ 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/a00776_source.html │ │ │ │ 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_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00785.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00785.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00785_source.html │ │ │ │ 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/a00794_source.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/a00797.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00797.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00797_source.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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00809.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00809_source.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/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/a00815.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00815_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/a00827.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00827_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00830_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00833.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00833.js │ │ │ │ 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/a00839.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00839.js │ │ │ │ -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/a00848.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a00848.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00845.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00845_source.html │ │ │ │ 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_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a00857.html │ │ │ │ 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/a00866.html │ │ │ │ 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/a00893.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00893_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/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/a00902.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00902_source.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/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/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/a00926_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00923.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00923_source.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/a00941_source.html │ │ │ │ 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/a00959.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00959_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/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/a00983.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a00986.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00986.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a00986_source.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.js │ │ │ │ +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/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/a00998_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/a01019_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01016.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01016.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01019.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/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/a01028.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01028_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/a01037_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01040.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01040.js │ │ │ │ +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/a01046_source.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/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/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/a01079.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01079_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01082_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01085.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01088.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01088_source.html │ │ │ │ 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/a01097_source.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/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/a01115.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 │ │ │ │ @@ -898,182 +893,187 @@ │ │ │ │ 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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01148.js │ │ │ │ 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/a01160.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01160.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01160_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/a01166.js │ │ │ │ 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/a01172_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01184.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01184.js │ │ │ │ +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/a01190_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01193.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01193.js │ │ │ │ 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/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/a01217_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01220.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01220.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01220_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01223.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/a01235_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01241.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01241.js │ │ │ │ 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/a01247.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01247.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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01274.js │ │ │ │ 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/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.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01286.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01286_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01289.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01292_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01295_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01298.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01298.js │ │ │ │ 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/a01313.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01313.js │ │ │ │ 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/a01322_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01325.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01325.js │ │ │ │ usr/share/doc/libgtsam-dev/html/a01325_source.html │ │ │ │ -usr/share/doc/libgtsam-dev/html/a01328.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01328_source.html │ │ │ │ usr/share/doc/libgtsam-dev/html/a01331.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/a01331.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01331_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_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/a01352_source.html │ │ │ │ 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/a01358.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01358_source.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/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/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/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/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/a01391.js │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01391_source.html │ │ │ │ +usr/share/doc/libgtsam-dev/html/a01400.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 ├── 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) 149154 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) 17818 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1016 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 65609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00002_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7913 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00005.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00005_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18897 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00008_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00011_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24215 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1480 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 51312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2508 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 192234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00017_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00020.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25066 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00023_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17409 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00026_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00029_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00032.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00035_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6884 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00038.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 9315 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) 5941 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00044.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52200 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00047_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7344 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) 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) 18926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1345 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00053.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27843 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00056_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00059.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27261 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00062_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 9727 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00065_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8401 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00068.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8418 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 343 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00071_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3446 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 77745 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00074_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15649 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 556 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00080_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16112 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00083_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28203 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2121 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00086.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6608 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82782 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00089_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35570 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00092_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00095_source.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) 7079 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00101_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12084 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 696 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00104_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9190 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 250 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12942 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00110_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7983 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48110 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00113_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00116.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00119_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00122.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2086 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00122.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57397 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00122_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10629 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00125_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9399 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00128_source.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) 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) 21582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56603 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00134_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13624 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39982 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00140_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00143_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11015 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 429 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37799 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00146_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6548 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00149.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00149.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20753 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00149_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 68 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00152_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10375 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 324 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00155_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00158_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8041 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24383 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00161_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 803 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85202 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00164_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7285 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22085 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00167_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00170.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00173.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40486 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00176_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32573 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00179_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10021 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) 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) 21706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00182_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5552 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00185.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6278 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00188.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7580 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29980 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00191_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6998 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00194_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00197.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12074 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 444 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 69958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00200_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5540 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00203.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 184 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00206.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47723 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00209_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5555 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00212.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00215.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25959 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00218_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13686 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 244 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00221.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6434 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19109 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00224_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8783 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 289 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00227_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9288 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50616 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00230_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00233.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00233.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00236.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6738 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44827 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00239_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13987 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00242_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 206584 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00245_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 309 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00248_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00251.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6642 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18784 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00254_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00257_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6320 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15576 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00260_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00263.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6594 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00269_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00272.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7039 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 94047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00275_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11986 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00278.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00278.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00278_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00284.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 389 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00284.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 71861 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00284_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00290.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7340 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00293_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00296.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00296.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00296_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 392 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 84719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00299_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33928 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00302_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00305.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00308.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00308.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32907 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00308_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 327 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00311.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6379 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00314.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) 39426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 127405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00323_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00326.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00326.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00326_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00329.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) 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) 7527 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49706 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00335_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6286 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8675 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00344.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00344.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6171 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00350.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6953 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30607 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00353_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7319 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 164 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00356.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11287 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00359.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7439 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00362_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7283 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00365.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00368.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00371_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00374_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32402 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00377_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8992 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24792 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00380_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6883 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00383_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 144 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00386_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00389.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5656 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00392.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 281 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 68835 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00395_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00398.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00398.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00398_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6302 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00401.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6858 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19855 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00404_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7206 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00407.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00407.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42743 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00407_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10872 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00410.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 457 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00410.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 61746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00410_source.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) 29089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00416_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5688 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31329 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00419_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5565 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00422.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00425.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) 5655 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00434.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7269 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00440.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00440.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00440_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6957 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) 34458 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00443_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00446.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00446.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34553 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00446_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23382 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00449_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00455.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21252 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) 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) 6284 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00461.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5538 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00464.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21198 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00467_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7741 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00470.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 174 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00470.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 103910 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00470_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00473_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6350 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00476.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4906 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00479.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) 5697 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00485.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6769 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00488_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5709 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00491.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8025 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00494_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7268 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18804 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00497_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5713 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00500.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7797 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00503.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00503.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36848 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00503_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6908 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 58194 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00506_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6582 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00509.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00509.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42027 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00509_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5524 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00512.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9159 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00515.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00515.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00518.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00521.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6226 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15209 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00524_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6737 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00527.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31373 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00530_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6690 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00533_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8586 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 270 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00536.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41431 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) 6506 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00542_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9935 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00545.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00545.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00545_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00548.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) 6322 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00554.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15766 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) 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) 9996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00908.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29636 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00560_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6587 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00563.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00563.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18018 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00563_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00566_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00572.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38682 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00575_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7505 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 221 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 65993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00578_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00581.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6945 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00584.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113625 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00584_source.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) 5671 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00590_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6367 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00593.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5591 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00596.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00599_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6700 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15755 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00602_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 178 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36162 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00605_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6363 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15140 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00608_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6454 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 46554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00611_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6879 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38328 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00614_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13267 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00617_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 240 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56707 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00620_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00626_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6436 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00629_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6476 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00632_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18421 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00635_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6695 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 189 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 62349 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00638_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7023 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23512 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00641_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00647_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6687 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00650_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8617 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19774 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00653_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00659_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00662_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5705 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00665_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7205 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 166 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00668_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5606 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22139 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00671_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5593 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00674.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17977 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00674_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 229 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00677_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15849 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 30059 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00680_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00683_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66585 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00689_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46729 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00695_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5529 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10019 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 449 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31790 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00701_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6581 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17930 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00704_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00713.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 160 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00713.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56968 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00713_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7323 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16423 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00716_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13381 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 665 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00719_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28869 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00722_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6366 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13881 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00725_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00728.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15960 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 891 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 125878 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00731_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7195 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00734_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7433 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 207 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22427 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00737_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00740.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6532 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 134 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12972 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00746_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5627 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00749.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5770 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00752_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8332 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 192 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00755.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6428 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00758.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00758.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25237 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00758_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5557 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6901 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 46918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00767_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7210 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00770_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38060 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00773_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00776.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26183 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00776_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00779_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12032 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00782_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7058 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00785.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00785.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39533 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00785_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5725 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6978 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35496 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00791_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10979 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 453 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00794.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8188 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 313 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00797.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 73410 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00797_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8871 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 415 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38721 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00800_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00806.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7999 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00809.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 276 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00809.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21749 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00809_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5691 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8957 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 60246 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00815_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6842 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40634 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00821_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6419 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00824.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7995 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00827.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 216 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00827.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 73746 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00827_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 69549 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00830_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12146 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00833.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 536 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00833.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15664 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00836_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5643 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00839.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00842_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6663 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 29640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00845_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00848_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8668 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 180 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00851_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8124 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00854.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00857.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9091 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 185 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00860.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7362 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00866_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 670 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28259 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00869_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5562 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00872.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6717 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22245 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00875_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7443 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 163 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33932 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00878_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00881.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00884.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7445 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35988 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00887_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7225 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 69400 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00890_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6387 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13406 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00893_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8297 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00896.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00896.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6475 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6448 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00902.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23692 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00902_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6390 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24874 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00905_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5669 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) 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) 6611 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18128 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00914_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11831 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00917.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7321 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 197 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 33342 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00920_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7029 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00923.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35940 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00923_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7639 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 202 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39261 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00932_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6359 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) 24129 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00935_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5609 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00938.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7069 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00941.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00941.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00941_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9760 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 316 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59601 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00944_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6921 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37965 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00950_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5635 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00953.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5559 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8571 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00959.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49274 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00959_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 231 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00968_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5660 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5612 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00974.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6683 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41393 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00977_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00980.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6963 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00983.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 8826 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00986.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 55825 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00986_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6864 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00989.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7763 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 223 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38413 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00992_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6414 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00995_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32900 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a00998_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) 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) 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) 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) 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) 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) 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) 7005 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54857 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01007_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6646 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13167 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01010_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 265 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01013_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7515 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01016.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5676 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01019.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6511 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 78 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17610 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01022_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10339 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 493 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50078 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01025_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24596 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01028_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5672 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01034.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8050 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 176 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37487 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01037_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8787 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01040.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 314 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01040.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 68014 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01040_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10047 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 118 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13067 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01043_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83353 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01046_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6802 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 137 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17991 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01049_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01052.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6735 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 131 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24143 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01055_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37759 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01058_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5816 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01061.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7249 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 84 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01064_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5641 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01070.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6201 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01073.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6766 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 155 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35912 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01076_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6521 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01079.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 81 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01079.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13022 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01079_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74370 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01082_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5757 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01085.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01088.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6662 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16604 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01091_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5542 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01094.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43820 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01097_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5791 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01100.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01103.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5778 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30718 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01106_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5765 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01109.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01112.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5598 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01115.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 364 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 103846 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01118_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6866 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 152 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28417 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01121_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25127 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01124_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8403 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 161 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23145 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01127_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8813 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 60117 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01130_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01133.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7509 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 23599 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01136_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11271 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 275 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88722 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01139_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6719 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 94502 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01142_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7312 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37468 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01145_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01148.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 154 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01148.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01148_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10303 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 693 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 99817 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01151_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7258 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 153 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32517 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01154_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6681 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 150 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01157_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15640 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01160.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 919 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01160.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 61984 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01160_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6497 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21256 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01163_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01166.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01166.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5544 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01169.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75095 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01172_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6896 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22430 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01184_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6626 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) 21272 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01187_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14404 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 807 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36213 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01190_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10834 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 168 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01193_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9294 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01196.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6465 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18491 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01199_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7661 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01202.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12714 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 674 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01205.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 7767 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01208.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8734 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 266 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75097 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01214_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7490 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14520 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01217_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6298 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01220.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01220.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 27993 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01220_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5657 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01223.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5666 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01226.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9089 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 337 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37621 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01229_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7996 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18886 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01232_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22253 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01235_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7064 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01241.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01241.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 6459 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01244_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30917 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01247.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 877 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01247.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53045 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01250_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77347 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01253_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17845 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13824 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01256_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27308 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2405 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44752 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01259_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7589 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 260 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 70927 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01262_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6954 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56560 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01265_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8386 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01268_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18044 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01271_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6262 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28637 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01274_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19703 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01277_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22375 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01280_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6186 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27374 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01283_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6450 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01286.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01286.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 99463 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01286_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01289.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34893 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) 7578 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01298.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 71 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01298.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18772 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01298_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6829 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 182 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 123331 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01301_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8061 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1057 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31679 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01304_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19138 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) 6847 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47234 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01313_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7173 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37474 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01316_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5751 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 20551 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01319_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9523 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 304 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01322_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7254 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01325.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01325.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80135 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01325_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32324 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01328_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7033 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01331.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01331.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 118926 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01331_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6936 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36516 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01337_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6595 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01340.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24742 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) 7426 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13828 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01346_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5566 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01349.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8056 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 222 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42918 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01352_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5554 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01355.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6102 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11368 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01358_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7720 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 280 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19653 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01361_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5543 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01364.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6590 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 156 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17141 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01367_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6648 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01370.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5537 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01373.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7075 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 45377 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01376_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6870 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 28867 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01379_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5575 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01382.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7104 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 148 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37514 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01388_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8301 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18569 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01391_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4958 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01400.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4933 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01403.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7579 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01403_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4950 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01406.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18761 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/a01406_source.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) 204449 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) 4396 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreedata.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14088 2024-01-09 05:51:35.000000 ./usr/share/doc/libgtsam-dev/html/navtreeindex0.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10747 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) 9520 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) 9628 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 │ │ │ │ +September 22, 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/FastDefaultAllocator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,206 +96,47 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
types.h File Reference
│ │ │ +Macros
│ │ │ +
FastDefaultAllocator.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Typedefs for easier changing of types. │ │ │ +

An easy way to control which allocator is used for Fast* collections. │ │ │ 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::internal::FastDefaultAllocator< T >
 Default allocator for list, map, and set types. 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 > >
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 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

│ │ │ -

Typedefs for easier changing of types.

│ │ │ +

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

│ │ │
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.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
Date
Aug 15, 2013
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,138 +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 | _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 │ │ │ │ +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 │ │ │ │ -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_:_:_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_:_:_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_ _>_ _> │ │ │ │ +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  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 ********** │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ +An easy way to control which allocator is used for Fast* collections. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - 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. │ │ │ │ + Aug 15, 2013 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_y_p_e_s_._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/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::FastDefaultAllocator< T >", "a02304.html", null], │ │ │ │ + ["gtsam::internal::FastDefaultVectorAllocator< T >", "a02308.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/FastDefaultAllocator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,318 +98,106 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
types.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
│ │ │ -
20#pragma once
│ │ │ +
19#pragma once
│ │ │ +
20#include <gtsam/config.h> // Configuration from CMake
│ │ │
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
│ │ │ +
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#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)
│ │ │ +
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#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 };
│ │ │ -
│ │ │ -
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}
│ │ │ -
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
│ │ │ -
259
│ │ │ -
260#endif
│ │ │ -
261
│ │ │ -
262#ifdef min
│ │ │ -
263#undef min
│ │ │ -
264#endif
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
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
│ │ │ -
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
│ │ │ +
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,343 +1,102 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -types.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 │ │ │ │ -20#pragma once │ │ │ │ +19#pragma once │ │ │ │ +20#include // Configuration from CMake │ │ │ │ 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 │ │ │ │ +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#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) │ │ │ │ +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#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 }; │ │ │ │ -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} │ │ │ │ -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 │ │ │ │ -259 │ │ │ │ -260#endif │ │ │ │ -261 │ │ │ │ -262#ifdef min │ │ │ │ -263#undef min │ │ │ │ -264#endif │ │ │ │ -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; │ │ │ │ +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_:_:_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_:_:_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_:_:_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 │ │ │ │ - * _t_y_p_e_s_._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/a00014.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/treeTraversal-inst.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/types.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,61 +94,208 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ Functions
│ │ │ -
treeTraversal-inst.h File Reference
│ │ │ +
types.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

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.
 
namespace  gtsam::treeTraversal
 Internal functions used for traversing trees.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +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

template<class FOREST , typename DATA , typename VISITOR_PRE , typename VISITOR_POST >
void gtsam::treeTraversal::DepthFirstForest (FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost)
 Traverse a forest depth-first with pre-order and post-order visits.
 
template<class FOREST , typename DATA , typename VISITOR_PRE >
void gtsam::treeTraversal::DepthFirstForest (FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre)
 Traverse a forest depth-first, with a pre-order visit but no post-order visit.
 
template<class FOREST , typename DATA , typename VISITOR_PRE , typename VISITOR_POST >
void gtsam::treeTraversal::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.
 
template<class FOREST >
FastVector< boost::shared_ptr< typename FOREST::Node > > gtsam::treeTraversal::CloneForest (const FOREST &forest)
 Clone a tree, copy-constructing new nodes (calling boost::make_shared) and setting up child pointers for a clone of the original tree.
 
template<class FOREST >
void gtsam::treeTraversal::PrintForest (const FOREST &forest, std::string str, const KeyFormatter &keyFormatter)
 Print a tree, prefixing each line with str, and formatting keys using keyFormatter.
 
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

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
April 9, 2013
│ │ │ -
│ │ │ +

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,68 +1,138 @@ │ │ │ │ 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 │ │ │ │ -treeTraversal-inst.h File Reference │ │ │ │ +_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. │ │ │ │   │ │ │ │ -namespace   _g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l │ │ │ │ -  Internal functions used for traversing trees. │ │ │ │ +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 │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - (FOREST &forest, DATA &rootData, │ │ │ │ - VISITOR_PRE &visitorPre, VISITOR_POST │ │ │ │ - &visitorPost) │ │ │ │ -  Traverse a forest depth-first with pre- │ │ │ │ - order and post-order visits. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - (FOREST &forest, DATA &rootData, │ │ │ │ - VISITOR_PRE &visitorPre) │ │ │ │ - Traverse a forest depth-first, with a │ │ │ │ -  pre-order visit but no post-order │ │ │ │ - visit. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  _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 (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. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_F_a_s_t_V_e_c_t_o_r< boost::shared_ptr< typename _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 │ │ │ │ - FOREST::Node > >  (const FOREST &forest) │ │ │ │ - Clone a tree, copy-constructing new │ │ │ │ -  nodes (calling boost::make_shared) and │ │ │ │ - setting up child pointers for a clone │ │ │ │ - of the original tree. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  _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 │ │ │ │ - (const FOREST &forest, std::string str, │ │ │ │ - const _K_e_y_F_o_r_m_a_t_t_e_r &keyFormatter) │ │ │ │ - Print a tree, prefixing each line with │ │ │ │ -  str, and formatting keys using │ │ │ │ - keyFormatter. │ │ │ │ + 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 ********** │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - April 9, 2013 │ │ │ │ + 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 │ │ │ │ - * _t_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ + * _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/a00014.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,7 +1,19 @@ │ │ │ │ var a00014 = [ │ │ │ │ - ["CloneForest", "a00014.html#a67e7c6f5c4916c4a58a783e6b566d55a", null], │ │ │ │ - ["DepthFirstForest", "a00014.html#a3735d0cee6f4d530e75479f7b1ebaf07", null], │ │ │ │ - ["DepthFirstForest", "a00014.html#a50e24f0a9085721425089cdce18f2475", null], │ │ │ │ - ["DepthFirstForestParallel", "a00014.html#afd7410807789da9ad91d6630063be36f", null], │ │ │ │ - ["PrintForest", "a00014.html#a7228bbaf6ad62b65be7a2084c01aae5c", null] │ │ │ │ + ["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", "a00014.html#a30d3af2da1ea940197addce4f3c223c8", null], │ │ │ │ + ["GTSAM_MAKE_ALIGNED_OPERATOR_NEW", "a00014.html#aa123dd61687e08ae328154a1890b7b86", null], │ │ │ │ + ["GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF", "a00014.html#a352ab46cee3a766e30b049690802fb0a", null], │ │ │ │ + ["DenseIndex", "a00014.html#a21006f326f57cdf7d3f35fec40f43e40", null], │ │ │ │ + ["FactorIndex", "a00014.html#a19c53f2faabb0f4b4b78ce2f7168cc14", null], │ │ │ │ + ["Key", "a00014.html#adad029f5f6ffce610428b5fe768b0df2", null], │ │ │ │ + ["void_t", "a00014.html#a6525d741529c7a2cd91fa913431f5fb7", null], │ │ │ │ + ["demangle", "a00014.html#a0b97fc96e5f69236e81489c66d5b92ba", null], │ │ │ │ + ["ListOfOne", "a00014.html#a045b43784acac77531813c4ab6c4d281", null] │ │ │ │ ]; │ │ ├── ./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/types.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,217 +98,318 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
treeTraversal-inst.h
│ │ │ +
types.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
│ │ │ -
17#pragma once
│ │ │ -
18
│ │ │ -
19#include <gtsam/base/treeTraversal/parallelTraversalTasks.h>
│ │ │ -
20#include <gtsam/base/treeTraversal/statistics.h>
│ │ │ +
20#pragma once
│ │ │
21
│ │ │ -
22#include <gtsam/base/FastList.h>
│ │ │ - │ │ │ -
24#include <gtsam/inference/Key.h>
│ │ │ +
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 <stack>
│ │ │ -
28#include <vector>
│ │ │ -
29#include <string>
│ │ │ -
30#include <boost/shared_ptr.hpp>
│ │ │ -
31#include <boost/make_shared.hpp>
│ │ │ +
27#include <cstddef>
│ │ │ +
28#include <cstdint>
│ │ │ +
29
│ │ │ +
30#include <exception>
│ │ │ +
31#include <string>
│ │ │
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};
│ │ │ -
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 }
│ │ │ +
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
│ │ │ -
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.
│ │ │ - │ │ │ -
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
│ │ │ +
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 };
│ │ │ +
│ │ │ +
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}
│ │ │ +
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
│ │ │ +
259
│ │ │ +
260#endif
│ │ │ +
261
│ │ │ +
262#ifdef min
│ │ │ +
263#undef min
│ │ │ +
264#endif
│ │ │ +
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;
│ │ │ +
│ │ │
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
│ │ │ +
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
│ │ │ +
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,243 +1,343 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -treeTraversal-inst.h │ │ │ │ +types.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 │ │ │ │ -17#pragma once │ │ │ │ -18 │ │ │ │ -19#include │ │ │ │ -20#include │ │ │ │ +20#pragma once │ │ │ │ 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> │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ 25#include // for GTSAM_USE_TBB │ │ │ │ 26 │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +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}; │ │ │ │ -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 } │ │ │ │ +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 │ │ │ │ -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/* ************************************************************************* │ │ │ │ +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 }; │ │ │ │ +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} │ │ │ │ +218 │ │ │ │ +219/* ************************************************************************* │ │ │ │ */ │ │ │ │ -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_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_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 │ │ │ │ +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 │ │ │ │ +259 │ │ │ │ +260#endif │ │ │ │ +261 │ │ │ │ +262#ifdef min │ │ │ │ +263#undef min │ │ │ │ +264#endif │ │ │ │ +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; │ │ │ │ _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_:_:_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_:_:_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_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ + * _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/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/numericalDerivative.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,210 +96,304 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
timing.h File Reference
│ │ │ +Functions
│ │ │ +
numericalDerivative.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Timing utilities. │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::internal::TimingOutline
 Timing Entry, arranged in a tree. More...
struct  gtsam::internal::FixedSizeMatrix< Y, X >
 
class  gtsam::internal::AutoTicToc
 Small class that calls internal::tic at construction, and internol::toc when destroyed. More...
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -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 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

│ │ │ -

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);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Some functions to compute numerical derivatives.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,108 +1,516 @@ │ │ │ │ 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_._._. │ │ │ │ +_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 │ │ │ │ -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_:_:_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_:_:_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_._._. │ │ │ │ + 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. │ │ │ │   │ │ │ │ -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 │ │ │ │ -  │ │ │ │ - GTSAM_EXTERN_EXPORT boost::weak_ptr< │ │ │ │ - _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │ +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 ********** │ │ │ │ -Timing utilities. │ │ │ │ +Some functions to compute numerical derivatives. │ │ │ │ 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); │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_i_m_i_n_g_._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/a00017.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,31 @@ │ │ │ │ var a00017 = [ │ │ │ │ - ["gtsam::internal::TimingOutline", "a02516.html", "a02516"], │ │ │ │ - ["gtsam::internal::AutoTicToc", "a02520.html", null] │ │ │ │ + ["gtsam::internal::FixedSizeMatrix< Y, X >", "a02440.html", null], │ │ │ │ + ["gtsam::G_x1< X1, X2 >", "a02444.html", null], │ │ │ │ + ["numericalDerivative11", "a00017.html#a581a9f8db043590096fbac682b8f6a93", null], │ │ │ │ + ["numericalDerivative11", "a00017.html#a4c4c5744f0b348d4ec6c047f796e7924", null], │ │ │ │ + ["numericalDerivative21", "a00017.html#a157eb3b44dd4e38bbd66f3cc68a20e43", null], │ │ │ │ + ["numericalDerivative21", "a00017.html#afcc94e3b49906e824c01a3d56df62d33", null], │ │ │ │ + ["numericalDerivative22", "a00017.html#a5b0db4ac5f279b12fc91fab4cb40b1bf", null], │ │ │ │ + ["numericalDerivative22", "a00017.html#a46d002a0529f1172aebb7e1d85d5c08c", null], │ │ │ │ + ["numericalDerivative31", "a00017.html#aa8f0264edaf78d503809c1e3152340ee", null], │ │ │ │ + ["numericalDerivative32", "a00017.html#acfbadc0ab0cd9386205b2737c5d0b727", null], │ │ │ │ + ["numericalDerivative33", "a00017.html#a526a422ea611724345affed8b71d9bac", null], │ │ │ │ + ["numericalDerivative41", "a00017.html#a3b0937e08e79604ee6ab10fca6ffe65e", null], │ │ │ │ + ["numericalDerivative42", "a00017.html#af40f61e8eff01acdb028ad33b8f3529b", null], │ │ │ │ + ["numericalDerivative43", "a00017.html#a6846b5cc84c1d5a54a436121b27057e0", null], │ │ │ │ + ["numericalDerivative44", "a00017.html#a8061b20199f839b115512d95d058fcbf", null], │ │ │ │ + ["numericalDerivative51", "a00017.html#a272af6f7139b76d085279060646e32d1", null], │ │ │ │ + ["numericalDerivative52", "a00017.html#a722e98babba795ce480f89527b572251", null], │ │ │ │ + ["numericalDerivative53", "a00017.html#acc2f741132522a6ce57d544a27a95855", null], │ │ │ │ + ["numericalDerivative54", "a00017.html#a2cf5181fc7bca1ef6a1070959de7b975", null], │ │ │ │ + ["numericalDerivative55", "a00017.html#a5ca42a2fc87373c005299f3087995a97", null], │ │ │ │ + ["numericalDerivative61", "a00017.html#a0ca8a22de666bc39015da34f150df748", null], │ │ │ │ + ["numericalDerivative62", "a00017.html#ac224e2384e41171181b2dbc0f700cdc1", null], │ │ │ │ + ["numericalDerivative63", "a00017.html#a15c46aa999886d4ccd06ab73fc02db31", null], │ │ │ │ + ["numericalDerivative64", "a00017.html#a3eb3fef9c77920dfd9496e71a0bcf669", null], │ │ │ │ + ["numericalDerivative65", "a00017.html#a799c83517a20a8e0b0b014f26b50f660", null], │ │ │ │ + ["numericalDerivative66", "a00017.html#a4e010b7f436124b9b421ba7dc438d987", null], │ │ │ │ + ["numericalGradient", "a00017.html#afd8862271510196ec4e2d894f623942d", null], │ │ │ │ + ["numericalHessian", "a00017.html#a11011d8e9bd69e486c9752875f710c18", null], │ │ │ │ + ["numericalHessian311", "a00017.html#a10295660c0177e08d45812fbb7e4c554", 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/numericalDerivative.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,328 +98,941 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
timing.h
│ │ │ +
numericalDerivative.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/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>
│ │ │ +
18// \callgraph
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <functional>
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26#include <gtsam/base/Lie.h>
│ │ │
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
│ │ │ +
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);
│ │ │ +
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#ifdef GTSAM_USE_TBB
│ │ │ -
124# include <tbb/tick_count.h>
│ │ │ -
125# undef min
│ │ │ -
126# undef max
│ │ │ -
127# undef ERROR
│ │ │ -
128#endif
│ │ │ +
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
│ │ │ -
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_;
│ │ │ +
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
│ │ │ -
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()
│ │ │ +
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
│ │ │ -
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; }
│ │ │ +
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
│ │ │ -
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}
│ │ │ +
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}
│ │ │
│ │ │ -
Typedefs for easier changing of types.
│ │ │ -
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,394 +1,1165 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -timing.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 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_/_F_a_s_t_M_a_p_._h> │ │ │ │ -21#include │ │ │ │ -22#include // for GTSAM_USE_TBB │ │ │ │ -23 │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ +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); │ │ │ │ +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#ifdef GTSAM_USE_TBB │ │ │ │ -124# include │ │ │ │ -125# undef min │ │ │ │ -126# undef max │ │ │ │ -127# undef ERROR │ │ │ │ -128#endif │ │ │ │ +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 │ │ │ │ -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_; │ │ │ │ +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 │ │ │ │ -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() │ │ │ │ +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 │ │ │ │ -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; } │ │ │ │ +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 │ │ │ │ -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. │ │ │ │ +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. │ │ │ │ +_J_a_c_o_b_i_a_n_F_a_c_t_o_r_._h │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ +Factor Graph Values. │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ - * _t_i_m_i_n_g_._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/a00020.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/timing.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/debug.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,54 +95,55 @@ │ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
timing.cpp File Reference
│ │ │ +Functions | │ │ │ +Variables
│ │ │ +
debug.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Timing utilities. │ │ │ +

Global debugging flags. │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ Functions

│ │ │ -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)
 
│ │ │ +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

│ │ │ -

Timing utilities.

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

Global debugging flags.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Feb 1, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +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 │ │ │ │ -timing.cpp 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 | _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 │ │ │ │ -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"))) │ │ │ │ +bool  ggttssaamm::::gguuaarrddeeddIIssDDeebbuugg (const std::string &s) │ │ │ │   │ │ │ │ - GTSAM_EXPORT boost::weak_ptr< ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │ - _T_i_m_i_n_g_O_u_t_l_i_n_e >  (gTimingRoot) │ │ │ │ +void  ggttssaamm::::gguuaarrddeeddSSeettDDeebbuugg (const std::string &s, const bool v) │ │ │ │   │ │ │ │ - size_t  ggttssaamm::::iinntteerrnnaall::::ggeettTTiiccTTooccIIDD (const char │ │ │ │ - *descriptionC) │ │ │ │ +bool  ggttssaamm::::iissDDeebbuuggVVeerrssiioonn () │ │ │ │   │ │ │ │ - void  ggttssaamm::::iinntteerrnnaall::::ttiicc (size_t id, const char │ │ │ │ - *labelC) │ │ │ │ -  │ │ │ │ - void  ggttssaamm::::iinntteerrnnaall::::ttoocc (size_t id, const char │ │ │ │ - *label) │ │ │ │ +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 ********** │ │ │ │ -Timing utilities. │ │ │ │ +Global debugging flags. │ │ │ │ Author │ │ │ │ - Richard Roberts, Michael Kaess │ │ │ │ + Richard Roberts │ │ │ │ Date │ │ │ │ - Oct 5, 2010 │ │ │ │ + Feb 1, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _t_i_m_i_n_g_._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/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/WeightedSampler.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,111 +98,152 @@ │ │ │
No Matches
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
testLie.h
│ │ │ +
WeightedSampler.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 */
│ │ │ -
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>
│ │ │ +
21#include <cmath>
│ │ │ +
22#include <queue>
│ │ │ +
23#include <random>
│ │ │ +
24#include <stdexcept>
│ │ │ +
25#include <utility>
│ │ │ +
26#include <vector>
│ │ │
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}
│ │ │ +
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) {}
│ │ │ +
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// 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));
│ │ │ +
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 // 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
│ │ │ +
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#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.
│ │ │ +
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;
│ │ │ +
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
│ │ │ +
│ │ │ +
137} // 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
│ │ │ +
Definition WeightedSampler.h:37
│ │ │ +
WeightedSampler(Engine *engine)
Construct from random number generation engine We only store a pointer to it.
Definition WeightedSampler.h:46
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -us-ascii │ │ │ │ +utf-8 │ │ │ ├── html2text {} │ │ │ │ @@ -1,119 +1,150 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -testLie.h │ │ │ │ +WeightedSampler.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 */ │ │ │ │ -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 │ │ │ │ +21#include │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +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} │ │ │ │ +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) {} │ │ │ │ +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()"); │ │ │ │ +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)); │ │ │ │ +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 // 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 │ │ │ │ +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#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. │ │ │ │ +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; │ │ │ │ +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 } │ │ │ │ +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 │ │ │ │ _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_:_:_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * tteessttLLiiee..hh │ │ │ │ + * _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/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/TestableAssertions.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,113 +95,104 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
serializationTestHelpers.h File Reference
│ │ │ +Functions
│ │ │ +
TestableAssertions.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ +

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

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ 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
 
│ │ │ +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

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

Provides additional testing facilities for common data structures.

│ │ │ +
Author
Alex Cunningham
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,92 +1,90 @@ │ │ │ │ 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 │ │ │ │ +_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_. │ │ │ │ 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 │ │ │ │ +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 ********** │ │ │ │ +Provides additional testing facilities for common data structures. │ │ │ │ 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_T_e_s_t_H_e_l_p_e_r_s_._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/a00026_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serializationTestHelpers.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/TestableAssertions.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,202 +98,399 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
serializationTestHelpers.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
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <iostream>
│ │ │ -
23#include <sstream>
│ │ │ -
24#include <string>
│ │ │ -
25
│ │ │ - │ │ │ -
27
│ │ │ -
28#include <boost/serialization/serialization.hpp>
│ │ │ -
29#include <boost/filesystem.hpp>
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ +
20#include <gtsam/base/Testable.h>
│ │ │ + │ │ │ +
22
│ │ │ +
23#include <boost/optional.hpp>
│ │ │ +
24#include <map>
│ │ │ +
25#include <iostream>
│ │ │ +
26#include <sstream>
│ │ │ +
27#include <vector>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │
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
│ │ │ -
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.
│ │ │ +
│ │ │ +
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
│ │ │ +
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#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}
│ │ │ +
│ │ │ +
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}
│ │ │ +
│ │ │ +
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);
│ │ │ +
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
│ │ │ -
bool deserializeFromXMLFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from an XML file
Definition serialization.h:174
│ │ │ -
std::string serialize(const T &input)
serializes to a string
Definition serialization.h:113
│ │ │ +
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
│ │ │ -
void deserializeBinary(const std::string &serialized, T &output, const std::string &name="data")
deserializes from a string in binary
Definition serialization.h:266
│ │ │ -
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
│ │ │ -
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
│ │ │ -
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
│ │ │ -
bool deserializeFromBinaryFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from a binary file
Definition serialization.h:248
│ │ │ +
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,239 +1,407 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -serializationTestHelpers.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 │ │ │ │ -20#pragma once │ │ │ │ -21 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ 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 │ │ │ │ -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. │ │ │ │ +_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 │ │ │ │ +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#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"); │ │ │ │ +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 │ │ │ │ +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_:_:_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 │ │ │ │ -std::string serialize(const T &input) │ │ │ │ -serializes to a string │ │ │ │ -DDeeffiinniittiioonn serialization.h:113 │ │ │ │ +_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_:_:_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_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_:_:_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_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_:_:_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_:_:_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 │ │ │ │ - * _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_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/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/ConcurrentMap.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,319 +98,140 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
serialization.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
│ │ │ -
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}
│ │ │ -
│ │ │ +
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
│ │ │ +
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
│ │ │ -
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
│ │ │ -
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
│ │ │ +
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::vector that uses a custom allocator.
│ │ │ +
A thin wrapper around std::map that uses boost's fast_pool_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
│ │ │ -
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
│ │ │ +
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,349 +1,168 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -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_. │ │ │ │ +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 │ │ │ │ -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} │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ +_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_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_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_:_:_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_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_:_:_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 │ │ │ │ - * _s_e_r_i_a_l_i_z_a_t_i_o_n_._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/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/DSFVector.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,306 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
numericalDerivative.h File Reference
│ │ │ +Namespaces
│ │ │ +
DSFVector.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Some functions to compute numerical derivatives. │ │ │ +

a faster implementation for DSF, which uses vector rather than btree. │ │ │ 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)
 
│ │ │

Detailed Description

│ │ │ -

Some functions to compute numerical derivatives.

│ │ │ -
Author
Frank Dellaert
│ │ │ +

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

│ │ │ +
Date
Jun 25, 2010
│ │ │ +
Author
Kai Ni
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,516 +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 │ │ │ │ -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_._._. │ │ │ │ -  │ │ │ │ +_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_._._. │ │ │ │ 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) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Some functions to compute numerical derivatives. │ │ │ │ +a faster implementation for DSF, which uses vector rather than btree. │ │ │ │ + Date │ │ │ │ + Jun 25, 2010 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Kai Ni │ │ │ │ * _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 │ │ │ │ + * _D_S_F_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/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/VerticalBlockMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,59 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
make_shared.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
VerticalBlockMatrix.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

make_shared trampoline function to ensure proper alignment │ │ │ +

A matrix with column blocks of pre-defined sizes. │ │ │ 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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

│ │ │ -

make_shared trampoline function to ensure proper alignment

│ │ │ -
Author
Fan Jiang
│ │ │ +

A matrix with column blocks of pre-defined sizes.

│ │ │ +

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,47 +1,29 @@ │ │ │ │ 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 │ │ │ │ +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_:_:_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. │ │ │ │   │ │ │ │ -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 ********** │ │ │ │ -make_shared trampoline function to ensure proper alignment │ │ │ │ +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 │ │ │ │ - Fan Jiang │ │ │ │ + Richard Roberts │ │ │ │ + Date │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _m_a_k_e___s_h_a_r_e_d_._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/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/VerticalBlockMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,68 +98,252 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
make_shared.h
│ │ │ +
VerticalBlockMatrix.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>
│ │ │ +
20#include <gtsam/base/Matrix.h>
│ │ │ + │ │ │ + │ │ │
23
│ │ │ -
24#include <boost/make_shared.hpp>
│ │ │ +
24namespace gtsam {
│ │ │
25
│ │ │ -
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 }
│ │ │ +
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
│ │ │ -
67}
│ │ │ -
Typedefs for easier changing of types.
│ │ │ +
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}
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Serialization for matrices.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,71 +1,346 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -make_shared.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 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 │ │ │ │ +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 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ 25 │ │ │ │ -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)...); │ │ │ │ +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 │ │ │ │ -67} │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ +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} │ │ │ │ +_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_M_a_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ +Serialization for matrices. │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ - * _m_a_k_e___s_h_a_r_e_d_._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/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/FastVector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,63 +95,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
lieProxies.h File Reference
│ │ │ +Typedefs
│ │ │ +
FastVector.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

A thin wrapper around std::vector that uses a custom allocator. │ │ │ 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)
 

│ │ │ +Typedefs

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

│ │ │ -

Provides convenient mappings of common member functions for testing.

│ │ │ -
Author
Alex Cunningham
│ │ │ +

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

│ │ │ +
Author
Richard Roberts
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
Feb 9, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,40 +1,31 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_. │ │ │ │ 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) │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +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 ********** │ │ │ │ -Provides convenient mappings of common member functions for testing. │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ Author │ │ │ │ - Alex Cunningham │ │ │ │ + Richard Roberts │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + Feb 9, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _l_i_e_P_r_o_x_i_e_s_._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/a00038.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,3 @@ │ │ │ │ var a00038 = [ │ │ │ │ - ["between", "a00038.html#a72a7c561cc91f437a22023297fb7f658", null], │ │ │ │ - ["inverse", "a00038.html#aaa623dd059a67523b029af6ec20a38da", null], │ │ │ │ - ["rotate", "a00038.html#a644bbe6719d8dd756e11e8b3d2fd229a", null] │ │ │ │ + ["FastVector", "a00038.html#gafeaa7d82369f3ff952157586240273c8", null] │ │ │ │ ]; │ │ ├── ./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/FastVector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,63 +98,47 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
lieProxies.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
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ - │ │ │ +
20#pragma once
│ │ │
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.
│ │ │ + │ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,67 +1,46 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -lieProxies.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 │ │ │ │ -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> │ │ │ │ +20#pragma once │ │ │ │ 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. │ │ │ │ +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 │ │ │ │ * _b_a_s_e │ │ │ │ - * _l_i_e_P_r_o_x_i_e_s_._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/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/VerticalBlockMatrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,56 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
debug.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
VerticalBlockMatrix.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Global debugging flags. │ │ │ +

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

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

│ │ │ 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
│ │ │ +

A matrix with column blocks of pre-defined sizes.

│ │ │ +

Used in JacobianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +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 | _V_a_r_i_a_b_l_e_s │ │ │ │ -debug.cpp File Reference │ │ │ │ -Global debugging flags. _M_o_r_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 │ │ │ │ -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. │ │ │ │ +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 │ │ │ │ - Feb 1, 2011 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _d_e_b_u_g_._c_p_p │ │ │ │ + * _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/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/cholesky.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,22 +96,20 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
cholesky.h File Reference
│ │ │ +
cholesky.cpp 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.
 
│ │ │ @@ -122,20 +120,22 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
 
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
│ │ │ +
Author
Richard Roberts
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
Date
Nov 5, 2010
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,16 @@ │ │ │ │ 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 │ │ │ │ +cholesky.cpp 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 │ │ │ │ @@ -23,13 +22,14 @@ │ │ │ │ [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_._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/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/Vector.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,46 +96,110 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
cholesky.cpp File Reference
│ │ │ +
Vector.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

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

│ │ │ 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].
 
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
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Richard Roberts
│ │ │ +

typedef and functions to augment Eigen's Vectors

│ │ │ +
Author
Kai Ni
│ │ │
│ │ │ -Frank Dellaert
│ │ │ -
Date
Nov 5, 2010
│ │ │ +Frank Dellaert │ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,105 @@ │ │ │ │ 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 │ │ │ │ -Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ -Cholesky. _M_o_r_e_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ 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]. │ │ │ │ + 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. │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (const std::list< Vector > &vs) │ │ │ │ +  concatenate Vectors │ │ │ │ +  │ │ │ │ + Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (size_t nrVectors,...) │ │ │ │ +  concatenate Vectors │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ -Cholesky. │ │ │ │ +typedef and functions to augment Eigen's Vectors │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + Kai Ni │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Nov 5, 2010 │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _c_h_o_l_e_s_k_y_._c_p_p │ │ │ │ + * _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/a00053.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,19 @@ │ │ │ │ var a00053 = [ │ │ │ │ - ["choleskyCareful", "a00053.html#a747683f736c50bca16b3aab0e95b1b76", null], │ │ │ │ - ["choleskyPartial", "a00053.html#abe82fa6aceccfa2360cf314ab44f39ad", null] │ │ │ │ + ["assert_equal", "a00053.html#ac3cf8e8e70cd696d9c789c31bc1e89a7", null], │ │ │ │ + ["assert_equal", "a00053.html#a9f3ee662d25ffb8c04b4e35c4b02e90b", null], │ │ │ │ + ["assert_inequal", "a00053.html#a2ca3db47b15350977c1f03c5560ab332", null], │ │ │ │ + ["concatVectors", "a00053.html#ae1c88acfa9575bcea3f2e738cb637a85", null], │ │ │ │ + ["concatVectors", "a00053.html#a09610ec69a8b3f3a00399bb378eda9cf", null], │ │ │ │ + ["ediv_", "a00053.html#a14844c96706dc362917e0d5e76d65fbe", null], │ │ │ │ + ["equal_with_abs_tol", "a00053.html#a8bdced1844ffd6a53af0396d82eaa6da", null], │ │ │ │ + ["fpEqual", "a00053.html#ae19c359190a379cba44bf818a2293f7c", null], │ │ │ │ + ["greaterThanOrEqual", "a00053.html#a368ee40bd9c0124d572d2e49bcb077bf", null], │ │ │ │ + ["house", "a00053.html#afb77eefc25dea0fb3e0fcc8f246b617a", null], │ │ │ │ + ["houseInPlace", "a00053.html#ac9c0c05b0198ec0fb6e4115edb755910", null], │ │ │ │ + ["linear_dependent", "a00053.html#a2a0cfd7908b06491df49b6a9c9186775", null], │ │ │ │ + ["operator==", "a00053.html#a64988014ab746343803620dc42513646", null], │ │ │ │ + ["print", "a00053.html#a760cc36e9009b23cf564c436294b3504", null], │ │ │ │ + ["print", "a00053.html#a5e5d8018a0f44a6a299406aeda27d44b", null], │ │ │ │ + ["save", "a00053.html#a09f2bbdb9f9d633542362dbe8d79f9ab", null], │ │ │ │ + ["weightedPseudoinverse", "a00053.html#aca1c56d11a05464a7a5458dc32ccc777", null] │ │ │ │ ]; │ │ ├── ./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/FastSet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,95 +98,162 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
chartTesting.h
│ │ │ +
FastSet.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()))));
│ │ │ +
21#include <boost/version.hpp>
│ │ │ +
22#if BOOST_VERSION >= 107400
│ │ │ +
23#include <boost/serialization/library_version_type.hpp>
│ │ │ +
24#endif
│ │ │ +
25#include <boost/serialization/nvp.hpp>
│ │ │ +
26#include <boost/serialization/set.hpp>
│ │ │ + │ │ │ +
28#include <gtsam/base/Testable.h>
│ │ │ +
29
│ │ │ +
30#include <functional>
│ │ │ +
31#include <set>
│ │ │ +
32
│ │ │ +
33namespace boost {
│ │ │ +
34namespace serialization {
│ │ │ +
35class access;
│ │ │ +
36} /* namespace serialization */
│ │ │ +
37} /* namespace boost */
│ │ │ +
38
│ │ │ +
39namespace gtsam {
│ │ │ +
40
│ │ │ +
48template<typename VALUE>
│ │ │ +
│ │ │ +
49class FastSet: public std::set<VALUE, std::less<VALUE>,
│ │ │ +
50 typename internal::FastDefaultAllocator<VALUE>::type> {
│ │ │
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.
│ │ │ +
52 BOOST_CONCEPT_ASSERT ((IsTestable<VALUE> ));
│ │ │ +
53
│ │ │ +
54public:
│ │ │ +
55
│ │ │ +
56 typedef std::set<VALUE, std::less<VALUE>,
│ │ │ +
57 typename internal::FastDefaultAllocator<VALUE>::type> Base;
│ │ │ +
58
│ │ │ +
59 using Base::Base; // Inherit the set constructors
│ │ │ +
60
│ │ │ +
61 FastSet() = default;
│ │ │ +
62
│ │ │ +
64 template<typename INPUTCONTAINER>
│ │ │ +
│ │ │ +
65 explicit FastSet(const INPUTCONTAINER& container) :
│ │ │ +
66 Base(container.begin(), container.end()) {
│ │ │ +
67 }
│ │ │ +
│ │ │ +
68
│ │ │ +
│ │ │ + │ │ │ +
71 Base(x) {
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
│ │ │ +
75 FastSet(const Base& x) :
│ │ │ +
76 Base(x) {
│ │ │ +
77 }
│ │ │ +
│ │ │ +
78
│ │ │ +
79#ifdef GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ +
81 FastSet(const std::set<VALUE>& x) {
│ │ │ +
82 // This if statement works around a bug in boost pool allocator and/or
│ │ │ +
83 // STL vector where if the size is zero, the pool allocator will allocate
│ │ │ +
84 // huge amounts of memory.
│ │ │ +
85 if(x.size() > 0)
│ │ │ +
86 Base::insert(x.begin(), x.end());
│ │ │ +
87 }
│ │ │ +
88#endif
│ │ │ +
89
│ │ │ +
│ │ │ +
91 operator std::set<VALUE>() const {
│ │ │ +
92 return std::set<VALUE>(this->begin(), this->end());
│ │ │ +
93 }
│ │ │ +
│ │ │ +
94
│ │ │ +
│ │ │ +
96 bool exists(const VALUE& e) const {
│ │ │ +
97 return this->find(e) != this->end();
│ │ │ +
98 }
│ │ │ +
│ │ │ +
99
│ │ │ +
│ │ │ +
101 void print(const std::string& str = "") const {
│ │ │ +
102 for (typename Base::const_iterator it = this->begin(); it != this->end(); ++it)
│ │ │ +
103 traits<VALUE>::Print(*it, str);
│ │ │ +
104 }
│ │ │ +
│ │ │ +
105
│ │ │ +
│ │ │ +
107 bool equals(const FastSet<VALUE>& other, double tol = 1e-9) const {
│ │ │ +
108 typename Base::const_iterator it1 = this->begin(), it2 = other.begin();
│ │ │ +
109 while (it1 != this->end()) {
│ │ │ +
110 if (it2 == other.end() || !traits<VALUE>::Equals(*it2, *it2, tol))
│ │ │ +
111 return false;
│ │ │ +
112 ++it1;
│ │ │ +
113 ++it2;
│ │ │ +
114 }
│ │ │ +
115 return true;
│ │ │ +
116 }
│ │ │ +
│ │ │ +
117
│ │ │ +
│ │ │ +
119 void merge(const FastSet& other) {
│ │ │ +
120 Base::insert(other.begin(), other.end());
│ │ │ +
121 }
│ │ │ +
│ │ │ +
122
│ │ │ +
123private:
│ │ │ + │ │ │ +
126 template<class ARCHIVE>
│ │ │ +
127 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
128 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
129 }
│ │ │ +
130};
│ │ │ +
│ │ │ +
131
│ │ │ +
132}
│ │ │ +
An easy way to control which allocator is used for Fast* collections.
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │
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
│ │ │ +
FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the defa...
Definition FastSet.h:50
│ │ │ +
void merge(const FastSet &other)
insert another set: handy for MATLAB access
Definition FastSet.h:119
│ │ │ +
void print(const std::string &str="") const
Print to implement Testable: pretty basic.
Definition FastSet.h:101
│ │ │ +
FastSet(const INPUTCONTAINER &container)
Constructor from a iterable container, passes through to base class.
Definition FastSet.h:65
│ │ │ +
FastSet(const FastSet< VALUE > &x)
Copy constructor from another FastSet.
Definition FastSet.h:70
│ │ │ +
bool exists(const VALUE &e) const
Handy 'exists' function.
Definition FastSet.h:96
│ │ │ +
bool equals(const FastSet< VALUE > &other, double tol=1e-9) const
Check for equality within tolerance to implement Testable.
Definition FastSet.h:107
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition FastSet.h:125
│ │ │ +
FastSet(const Base &x)
Copy constructor from the base set class.
Definition FastSet.h:75
│ │ │ +
FastSet()=default
Default constructor.
│ │ │ +
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,95 +1,176 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -chartTesting.h │ │ │ │ +FastSet.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())))); │ │ │ │ +21#include │ │ │ │ +22#if BOOST_VERSION >= 107400 │ │ │ │ +23#include │ │ │ │ +24#endif │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#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> │ │ │ │ +28#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +29 │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32 │ │ │ │ +33namespace boost { │ │ │ │ +34namespace serialization { │ │ │ │ +35class access; │ │ │ │ +36} /* namespace serialization */ │ │ │ │ +37} /* namespace boost */ │ │ │ │ +38 │ │ │ │ +39namespace _g_t_s_a_m { │ │ │ │ +40 │ │ │ │ +48template │ │ │ │ +_4_9class _F_a_s_t_S_e_t: public std::set, │ │ │ │ +50 typename internal::FastDefaultAllocator::type> { │ │ │ │ 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); } │ │ │ │ +52 BOOST_CONCEPT_ASSERT ((_I_s_T_e_s_t_a_b_l_e_<_V_A_L_U_E_> )); │ │ │ │ +53 │ │ │ │ +54public: │ │ │ │ +55 │ │ │ │ +56 typedef std::set, │ │ │ │ +57 typename internal::FastDefaultAllocator::type> Base; │ │ │ │ +58 │ │ │ │ +59 using Base::Base; // Inherit the set constructors │ │ │ │ +60 │ │ │ │ +_6_1 _F_a_s_t_S_e_t() = default; │ │ │ │ +62 │ │ │ │ +64 template │ │ │ │ +_6_5 explicit _F_a_s_t_S_e_t(const INPUTCONTAINER& container) : │ │ │ │ +66 Base(container.begin(), container.end()) { │ │ │ │ +67 } │ │ │ │ +68 │ │ │ │ +_7_0 _F_a_s_t_S_e_t(const _F_a_s_t_S_e_t_<_V_A_L_U_E_>& x) : │ │ │ │ +71 Base(x) { │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +_7_5 _F_a_s_t_S_e_t(const Base& x) : │ │ │ │ +76 Base(x) { │ │ │ │ +77 } │ │ │ │ +78 │ │ │ │ +79#ifdef GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ +81 _F_a_s_t_S_e_t(const std::set& x) { │ │ │ │ +82 // This if statement works around a bug in boost pool allocator and/or │ │ │ │ +83 // STL vector where if the size is zero, the pool allocator will allocate │ │ │ │ +84 // huge amounts of memory. │ │ │ │ +85 if(x.size() > 0) │ │ │ │ +86 Base::insert(x.begin(), x.end()); │ │ │ │ +87 } │ │ │ │ +88#endif │ │ │ │ +89 │ │ │ │ +_9_1 operator std::set() const { │ │ │ │ +92 return std::set(this->begin(), this->end()); │ │ │ │ +93 } │ │ │ │ +94 │ │ │ │ +_9_6 bool _e_x_i_s_t_s(const VALUE& e) const { │ │ │ │ +97 return this->find(e) != this->end(); │ │ │ │ +98 } │ │ │ │ +99 │ │ │ │ +_1_0_1 void _p_r_i_n_t(const std::string& str = "") const { │ │ │ │ +102 for (typename Base::const_iterator it = this->begin(); it != this->end(); │ │ │ │ +++it) │ │ │ │ +103 _t_r_a_i_t_s_<_V_A_L_U_E_>_:_:_P_r_i_n_t(*it, str); │ │ │ │ +104 } │ │ │ │ +105 │ │ │ │ +_1_0_7 bool _e_q_u_a_l_s(const _F_a_s_t_S_e_t_<_V_A_L_U_E_>& other, double tol = 1e-9) const { │ │ │ │ +108 typename Base::const_iterator it1 = this->begin(), it2 = other.begin(); │ │ │ │ +109 while (it1 != this->end()) { │ │ │ │ +110 if (it2 == other.end() || !_t_r_a_i_t_s_<_V_A_L_U_E_>_:_:_E_q_u_a_l_s(*it2, *it2, tol)) │ │ │ │ +111 return false; │ │ │ │ +112 ++it1; │ │ │ │ +113 ++it2; │ │ │ │ +114 } │ │ │ │ +115 return true; │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +_1_1_9 void _m_e_r_g_e(const _F_a_s_t_S_e_t& other) { │ │ │ │ +120 Base::insert(other.begin(), other.end()); │ │ │ │ +121 } │ │ │ │ +122 │ │ │ │ +123private: │ │ │ │ +_1_2_5 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; │ │ │ │ +126 template │ │ │ │ +127 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +128 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ +129 } │ │ │ │ +130}; │ │ │ │ +131 │ │ │ │ +132} │ │ │ │ +_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. │ │ │ │ _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. │ │ │ │ _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_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet is a thin wrapper around std::set that uses the boost │ │ │ │ +fast_pool_allocator instead of the defa... │ │ │ │ +DDeeffiinniittiioonn FastSet.h:50 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_m_e_r_g_e │ │ │ │ +void merge(const FastSet &other) │ │ │ │ +insert another set: handy for MATLAB access │ │ │ │ +DDeeffiinniittiioonn FastSet.h:119 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &str="") const │ │ │ │ +Print to implement Testable: pretty basic. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:101 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet(const INPUTCONTAINER &container) │ │ │ │ +Constructor from a iterable container, passes through to base class. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:65 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet(const FastSet< VALUE > &x) │ │ │ │ +Copy constructor from another FastSet. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:70 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_e_x_i_s_t_s │ │ │ │ +bool exists(const VALUE &e) const │ │ │ │ +Handy 'exists' function. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:96 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const FastSet< VALUE > &other, double tol=1e-9) const │ │ │ │ +Check for equality within tolerance to implement Testable. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:107 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:125 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet(const Base &x) │ │ │ │ +Copy constructor from the base set class. │ │ │ │ +DDeeffiinniittiioonn FastSet.h:75 │ │ │ │ +_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet()=default │ │ │ │ +Default constructor. │ │ │ │ +_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * cchhaarrttTTeessttiinngg..hh │ │ │ │ + * _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/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/types.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,44 +94,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
WeightedSampler.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
types.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Fast sampling without replacement. │ │ │ +

Functions for handling type information. │ │ │ 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

std::string gtsam::demangle (const char *name)
 Pretty print Value type name.
 
│ │ │

Detailed Description

│ │ │ -

Fast sampling without replacement.

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

Functions for handling type information.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
Date
May 18, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +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 │ │ │ │ -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_ _> │ │ │ │ -  │ │ │ │ +_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 │ │ │ │ +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 ********** │ │ │ │ -Fast sampling without replacement. │ │ │ │ +Functions for handling type information. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Varun Agrawal │ │ │ │ Date │ │ │ │ - May 2019 │ │ │ │ + May 18, 2020 │ │ │ │ * _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 │ │ │ │ + * _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/a00059.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00059 = [ │ │ │ │ - ["gtsam::WeightedSampler< Engine >", "a02664.html", "a02664"] │ │ │ │ + ["demangle", "a00059.html#a0b97fc96e5f69236e81489c66d5b92ba", null] │ │ │ │ ]; │ │ ├── ./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/Vector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,186 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
VerticalBlockMatrix.h 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.

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

│ │ │ -Classes

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.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +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,29 +1,147 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_. │ │ │ │ -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_._._. │ │ │ │ -  │ │ │ │ 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_._h │ │ │ │ + * _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/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/Vector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,252 +98,192 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
VerticalBlockMatrix.h
│ │ │ +
Vector.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);
│ │ │ +
21// \callgraph
│ │ │ +
22
│ │ │ +
23#pragma once
│ │ │ +
24#ifndef MKL_BLAS
│ │ │ +
25#define MKL_BLAS MKL_DOMAIN_BLAS
│ │ │ +
26#endif
│ │ │ +
27
│ │ │ + │ │ │ +
29#include <Eigen/Core>
│ │ │ +
30#include <iosfwd>
│ │ │ +
31#include <list>
│ │ │ +
32
│ │ │ +
33namespace gtsam {
│ │ │ +
34
│ │ │ +
35// Vector is just a typedef of the Eigen dynamic vector type
│ │ │ +
36
│ │ │ +
37// Typedef arbitary length vector
│ │ │ +
38typedef Eigen::VectorXd Vector;
│ │ │ +
39
│ │ │ +
40// Commonly used fixed size vectors
│ │ │ +
41typedef Eigen::Matrix<double, 1, 1> Vector1;
│ │ │ +
42typedef Eigen::Vector2d Vector2;
│ │ │ +
43typedef Eigen::Vector3d Vector3;
│ │ │ +
44
│ │ │ +
45static const Eigen::MatrixBase<Vector2>::ConstantReturnType Z_2x1 = Vector2::Zero();
│ │ │ +
46static const Eigen::MatrixBase<Vector3>::ConstantReturnType Z_3x1 = Vector3::Zero();
│ │ │ +
47
│ │ │ +
48// Create handy typedefs and constants for vectors with N>3
│ │ │ +
49// VectorN and Z_Nx1, for N=1..9
│ │ │ +
50#define GTSAM_MAKE_VECTOR_DEFS(N) \
│ │ │ +
51 using Vector##N = Eigen::Matrix<double, N, 1>; \
│ │ │ +
52 static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
│ │ │ +
53
│ │ │ +
54GTSAM_MAKE_VECTOR_DEFS(4)
│ │ │ +
55GTSAM_MAKE_VECTOR_DEFS(5)
│ │ │ +
56GTSAM_MAKE_VECTOR_DEFS(6)
│ │ │ +
57GTSAM_MAKE_VECTOR_DEFS(7)
│ │ │ +
58GTSAM_MAKE_VECTOR_DEFS(8)
│ │ │ +
59GTSAM_MAKE_VECTOR_DEFS(9)
│ │ │ +
60GTSAM_MAKE_VECTOR_DEFS(10)
│ │ │ +
61GTSAM_MAKE_VECTOR_DEFS(11)
│ │ │ +
62GTSAM_MAKE_VECTOR_DEFS(12)
│ │ │ +
63GTSAM_MAKE_VECTOR_DEFS(15)
│ │ │ +
64
│ │ │ +
65typedef Eigen::VectorBlock<Vector> SubVector;
│ │ │ +
66typedef Eigen::VectorBlock<const Vector> ConstSubVector;
│ │ │ +
67
│ │ │ +
73#if defined(GTSAM_EIGEN_VERSION_WORLD)
│ │ │ +
74static_assert(
│ │ │ +
75 GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION &&
│ │ │ +
76 GTSAM_EIGEN_VERSION_MAJOR==EIGEN_MAJOR_VERSION,
│ │ │ +
77 "Error: GTSAM was built against a different version of Eigen");
│ │ │ +
78#endif
│ │ │ +
79
│ │ │ +
96GTSAM_EXPORT bool fpEqual(double a, double b, double tol,
│ │ │ +
97 bool check_relative_also = true);
│ │ │ +
98
│ │ │ +
102GTSAM_EXPORT void print(const Vector& v, const std::string& s, std::ostream& stream);
│ │ │ +
103
│ │ │ +
107GTSAM_EXPORT void print(const Vector& v, const std::string& s = "");
│ │ │
108
│ │ │ -
112 static VerticalBlockMatrix LikeActiveViewOf(const SymmetricBlockMatrix& rhs, DenseIndex height);
│ │ │ +
112GTSAM_EXPORT void save(const Vector& A, const std::string &s, const std::string& filename);
│ │ │
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); }
│ │ │ +
117GTSAM_EXPORT bool operator==(const Vector& vec1,const Vector& vec2);
│ │ │ +
118
│ │ │ +
124GTSAM_EXPORT bool greaterThanOrEqual(const Vector& v1, const Vector& v2);
│ │ │
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
│ │ │ +
129GTSAM_EXPORT bool equal_with_abs_tol(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ +
130GTSAM_EXPORT bool equal_with_abs_tol(const SubVector& vec1, const SubVector& vec2, double tol=1e-9);
│ │ │ +
131
│ │ │ +
│ │ │ +
135inline bool equal(const Vector& vec1, const Vector& vec2, double tol) {
│ │ │ +
136 return equal_with_abs_tol(vec1, vec2, tol);
│ │ │ +
137}
│ │ │ +
│ │ │ +
138
│ │ │ +
│ │ │ +
142inline bool equal(const Vector& vec1, const Vector& vec2) {
│ │ │ +
143 return equal_with_abs_tol(vec1, vec2);
│ │ │ +
144}
│ │ │ +
│ │ │ +
145
│ │ │ +
153GTSAM_EXPORT bool assert_equal(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ +
154
│ │ │ +
162GTSAM_EXPORT bool assert_inequal(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ +
163
│ │ │ +
171GTSAM_EXPORT bool assert_equal(const SubVector& vec1, const SubVector& vec2, double tol=1e-9);
│ │ │ +
172GTSAM_EXPORT bool assert_equal(const ConstSubVector& vec1, const ConstSubVector& vec2, double tol=1e-9);
│ │ │ +
173
│ │ │ +
181GTSAM_EXPORT bool linear_dependent(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ +
182
│ │ │ +
189GTSAM_EXPORT Vector ediv_(const Vector &a, const Vector &b);
│ │ │ +
190
│ │ │ +
194template<class V1, class V2>
│ │ │ +
│ │ │ +
195inline double dot(const V1 &a, const V2& b) {
│ │ │ +
196 assert (b.size()==a.size());
│ │ │ +
197 return a.dot(b);
│ │ │ +
198}
│ │ │ +
│ │ │ +
199
│ │ │ +
201template<class V1, class V2>
│ │ │ +
│ │ │ +
202inline double inner_prod(const V1 &a, const V2& b) {
│ │ │ +
203 assert (b.size()==a.size());
│ │ │ +
204 return a.dot(b);
│ │ │ +
205}
│ │ │ +
│ │ │ +
206
│ │ │ +
207#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ +
212inline void GTSAM_DEPRECATED scal(double alpha, Vector& x) { x *= alpha; }
│ │ │ +
213
│ │ │ +
218template<class V1, class V2>
│ │ │ +
219inline void GTSAM_DEPRECATED axpy(double alpha, const V1& x, V2& y) {
│ │ │ +
220 assert (y.size()==x.size());
│ │ │ +
221 y += alpha * x;
│ │ │ +
222}
│ │ │ +
223inline void axpy(double alpha, const Vector& x, SubVector y) {
│ │ │ +
224 assert (y.size()==x.size());
│ │ │ +
225 y += alpha * x;
│ │ │ +
226}
│ │ │ +
227#endif
│ │ │ +
228
│ │ │ +
234GTSAM_EXPORT std::pair<double,Vector> house(const Vector &x);
│ │ │ +
235
│ │ │ +
237GTSAM_EXPORT double houseInPlace(Vector &x);
│ │ │ +
238
│ │ │ +
249GTSAM_EXPORT std::pair<Vector, double>
│ │ │ +
250weightedPseudoinverse(const Vector& v, const Vector& weights);
│ │ │ +
251
│ │ │ +
252/*
│ │ │ +
253 * Fast version *no error checking* !
│ │ │ +
254 * Pass in initialized vector pseudo of size(weights) or will crash !
│ │ │ +
255 * @return the precision, pseudoinverse in third argument
│ │ │ +
256 */
│ │ │ +
257GTSAM_EXPORT double weightedPseudoinverse(const Vector& a, const Vector& weights, Vector& pseudo);
│ │ │ +
258
│ │ │ +
262GTSAM_EXPORT Vector concatVectors(const std::list<Vector>& vs);
│ │ │ +
263
│ │ │ +
267GTSAM_EXPORT Vector concatVectors(size_t nrVectors, ...);
│ │ │ +
268} // namespace gtsam
│ │ │ +
Included from all GTSAM files.
│ │ │
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
│ │ │ +
Vector ediv_(const Vector &a, const Vector &b)
elementwise division, but 0/0 = 0, not inf
Definition Vector.cpp:199
│ │ │ +
bool greaterThanOrEqual(const Vector &vec1, const Vector &vec2)
Greater than or equal to operation returns true if all elements in v1 are greater than corresponding ...
Definition Vector.cpp:114
│ │ │ +
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
│ │ │ +
double inner_prod(const V1 &a, const V2 &b)
compatibility version for ublas' inner_prod()
Definition Vector.h:202
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ +
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y
Definition Errors.cpp:111
│ │ │ +
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
│ │ │ +
double houseInPlace(Vector &v)
beta = house(x) computes the HouseHolder vector in place
Definition Vector.cpp:212
│ │ │ +
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition Testable.h:84
│ │ │ +
double dot(const V1 &a, const V2 &b)
Dot product.
Definition Vector.h:195
│ │ │ +
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
│ │ │ +
Vector concatVectors(const std::list< Vector > &vs)
concatenate Vectors
Definition Vector.cpp:302
│ │ │ +
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
│ │ │ +
pair< double, Vector > house(const Vector &x)
house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding ...
Definition Vector.cpp:237
│ │ │ +
bool operator==(const Matrix &A, const Matrix &B)
equality is just equal_with_abs_tol 1e-9
Definition Matrix.h:100
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,346 +1,247 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -VerticalBlockMatrix.h │ │ │ │ +Vector.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); │ │ │ │ +21// \callgraph │ │ │ │ +22 │ │ │ │ +23#pragma once │ │ │ │ +24#ifndef MKL_BLAS │ │ │ │ +25#define MKL_BLAS MKL_DOMAIN_BLAS │ │ │ │ +26#endif │ │ │ │ +27 │ │ │ │ +28#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32 │ │ │ │ +33namespace _g_t_s_a_m { │ │ │ │ +34 │ │ │ │ +35// Vector is just a typedef of the Eigen dynamic vector type │ │ │ │ +36 │ │ │ │ +37// Typedef arbitary length vector │ │ │ │ +38typedef Eigen::VectorXd Vector; │ │ │ │ +39 │ │ │ │ +40// Commonly used fixed size vectors │ │ │ │ +41typedef Eigen::Matrix Vector1; │ │ │ │ +42typedef Eigen::Vector2d Vector2; │ │ │ │ +43typedef Eigen::Vector3d Vector3; │ │ │ │ +44 │ │ │ │ +45static const Eigen::MatrixBase::ConstantReturnType Z_2x1 = Vector2:: │ │ │ │ +Zero(); │ │ │ │ +46static const Eigen::MatrixBase::ConstantReturnType Z_3x1 = Vector3:: │ │ │ │ +Zero(); │ │ │ │ +47 │ │ │ │ +48// Create handy typedefs and constants for vectors with N>3 │ │ │ │ +49// VectorN and Z_Nx1, for N=1..9 │ │ │ │ +50#define GTSAM_MAKE_VECTOR_DEFS(N) \ │ │ │ │ +51 using Vector##N = Eigen::Matrix; \ │ │ │ │ +52 static const Eigen::MatrixBase::ConstantReturnType Z_##N##x1 = │ │ │ │ +Vector##N::Zero(); │ │ │ │ +53 │ │ │ │ +54GTSAM_MAKE_VECTOR_DEFS(4) │ │ │ │ +55GTSAM_MAKE_VECTOR_DEFS(5) │ │ │ │ +56GTSAM_MAKE_VECTOR_DEFS(6) │ │ │ │ +57GTSAM_MAKE_VECTOR_DEFS(7) │ │ │ │ +58GTSAM_MAKE_VECTOR_DEFS(8) │ │ │ │ +59GTSAM_MAKE_VECTOR_DEFS(9) │ │ │ │ +60GTSAM_MAKE_VECTOR_DEFS(10) │ │ │ │ +61GTSAM_MAKE_VECTOR_DEFS(11) │ │ │ │ +62GTSAM_MAKE_VECTOR_DEFS(12) │ │ │ │ +63GTSAM_MAKE_VECTOR_DEFS(15) │ │ │ │ +64 │ │ │ │ +65typedef Eigen::VectorBlock SubVector; │ │ │ │ +66typedef Eigen::VectorBlock ConstSubVector; │ │ │ │ +67 │ │ │ │ +73#if defined(GTSAM_EIGEN_VERSION_WORLD) │ │ │ │ +74static_assert( │ │ │ │ +75 GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION && │ │ │ │ +76 GTSAM_EIGEN_VERSION_MAJOR==EIGEN_MAJOR_VERSION, │ │ │ │ +77 "Error: GTSAM was built against a different version of Eigen"); │ │ │ │ +78#endif │ │ │ │ +79 │ │ │ │ +96GTSAM_EXPORT bool _f_p_E_q_u_a_l(double a, double b, double tol, │ │ │ │ +97 bool check_relative_also = true); │ │ │ │ +98 │ │ │ │ +102GTSAM_EXPORT void _p_r_i_n_t(const Vector& v, const std::string& s, std::ostream& │ │ │ │ +stream); │ │ │ │ +103 │ │ │ │ +107GTSAM_EXPORT void _p_r_i_n_t(const Vector& v, const std::string& s = ""); │ │ │ │ 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); │ │ │ │ +112GTSAM_EXPORT void _s_a_v_e(const Vector& A, const std::string &s, const std:: │ │ │ │ +string& filename); │ │ │ │ 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); } │ │ │ │ +117GTSAM_EXPORT bool _o_p_e_r_a_t_o_r_=_=(const Vector& vec1,const Vector& vec2); │ │ │ │ +118 │ │ │ │ +124GTSAM_EXPORT bool _g_r_e_a_t_e_r_T_h_a_n_O_r_E_q_u_a_l(const Vector& v1, const Vector& v2); │ │ │ │ 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 │ │ │ │ +129GTSAM_EXPORT bool _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const Vector& vec1, const Vector& vec2, │ │ │ │ +double tol=1e-9); │ │ │ │ +130GTSAM_EXPORT bool _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const SubVector& vec1, const SubVector& │ │ │ │ +vec2, double tol=1e-9); │ │ │ │ +131 │ │ │ │ +_1_3_5inline bool _e_q_u_a_l(const Vector& vec1, const Vector& vec2, double tol) { │ │ │ │ +136 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(vec1, vec2, tol); │ │ │ │ +137} │ │ │ │ +138 │ │ │ │ +_1_4_2inline bool _e_q_u_a_l(const Vector& vec1, const Vector& vec2) { │ │ │ │ +143 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(vec1, vec2); │ │ │ │ +144} │ │ │ │ +145 │ │ │ │ +153GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const Vector& vec1, const Vector& vec2, │ │ │ │ +double tol=1e-9); │ │ │ │ +154 │ │ │ │ +162GTSAM_EXPORT bool _a_s_s_e_r_t___i_n_e_q_u_a_l(const Vector& vec1, const Vector& vec2, │ │ │ │ +double tol=1e-9); │ │ │ │ +163 │ │ │ │ +171GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const SubVector& vec1, const SubVector& vec2, │ │ │ │ +double tol=1e-9); │ │ │ │ +172GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const ConstSubVector& vec1, const │ │ │ │ +ConstSubVector& vec2, double tol=1e-9); │ │ │ │ +173 │ │ │ │ +181GTSAM_EXPORT bool _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); │ │ │ │ +182 │ │ │ │ +189GTSAM_EXPORT Vector _e_d_i_v__(const Vector &a, const Vector &b); │ │ │ │ +190 │ │ │ │ +194template │ │ │ │ +_1_9_5inline double _d_o_t(const V1 &a, const V2& b) { │ │ │ │ +196 assert (b.size()==a.size()); │ │ │ │ +197 return a.dot(b); │ │ │ │ +198} │ │ │ │ +199 │ │ │ │ +201template │ │ │ │ +_2_0_2inline double _i_n_n_e_r___p_r_o_d(const V1 &a, const V2& b) { │ │ │ │ +203 assert (b.size()==a.size()); │ │ │ │ +204 return a.dot(b); │ │ │ │ +205} │ │ │ │ +206 │ │ │ │ +207#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ +212inline void GTSAM_DEPRECATED scal(double alpha, Vector& x) { x *= alpha; } │ │ │ │ +213 │ │ │ │ +218template │ │ │ │ +219inline void GTSAM_DEPRECATED _a_x_p_y(double alpha, const V1& x, V2& y) { │ │ │ │ +220 assert (y.size()==x.size()); │ │ │ │ +221 y += alpha * x; │ │ │ │ +222} │ │ │ │ +223inline void _a_x_p_y(double alpha, const Vector& x, SubVector y) { │ │ │ │ +224 assert (y.size()==x.size()); │ │ │ │ +225 y += alpha * x; │ │ │ │ +226} │ │ │ │ +227#endif │ │ │ │ +228 │ │ │ │ +234GTSAM_EXPORT std::pair _h_o_u_s_e(const Vector &x); │ │ │ │ +235 │ │ │ │ +237GTSAM_EXPORT double _h_o_u_s_e_I_n_P_l_a_c_e(Vector &x); │ │ │ │ +238 │ │ │ │ +249GTSAM_EXPORT std::pair │ │ │ │ +250weightedPseudoinverse(const Vector& v, const Vector& weights); │ │ │ │ +251 │ │ │ │ +252/* │ │ │ │ +253 * Fast version *no error checking* ! │ │ │ │ +254 * Pass in initialized vector pseudo of size(weights) or will crash ! │ │ │ │ +255 * @return the precision, pseudoinverse in third argument │ │ │ │ +256 */ │ │ │ │ +257GTSAM_EXPORT double weightedPseudoinverse(const Vector& a, const Vector& │ │ │ │ +weights, Vector& pseudo); │ │ │ │ +258 │ │ │ │ +262GTSAM_EXPORT Vector _c_o_n_c_a_t_V_e_c_t_o_r_s(const std::list& vs); │ │ │ │ +263 │ │ │ │ +267GTSAM_EXPORT Vector _c_o_n_c_a_t_V_e_c_t_o_r_s(size_t nrVectors, ...); │ │ │ │ +268} // namespace gtsam │ │ │ │ +_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_:_:_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_:_:_e_d_i_v__ │ │ │ │ +Vector ediv_(const Vector &a, const Vector &b) │ │ │ │ +elementwise division, but 0/0 = 0, not inf │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:199 │ │ │ │ +_g_t_s_a_m_:_:_g_r_e_a_t_e_r_T_h_a_n_O_r_E_q_u_a_l │ │ │ │ +bool greaterThanOrEqual(const Vector &vec1, const Vector &vec2) │ │ │ │ +Greater than or equal to operation returns true if all elements in v1 are │ │ │ │ +greater than corresponding ... │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:114 │ │ │ │ +_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_:_:_i_n_n_e_r___p_r_o_d │ │ │ │ +double inner_prod(const V1 &a, const V2 &b) │ │ │ │ +compatibility version for ublas' inner_prod() │ │ │ │ +DDeeffiinniittiioonn Vector.h:202 │ │ │ │ +_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_x_p_y │ │ │ │ +void axpy(double alpha, const Errors &x, Errors &y) │ │ │ │ +BLAS level 2 style AXPY, y := alpha*x + y │ │ │ │ +DDeeffiinniittiioonn Errors.cpp:111 │ │ │ │ +_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_I_n_P_l_a_c_e │ │ │ │ +double houseInPlace(Vector &v) │ │ │ │ +beta = house(x) computes the HouseHolder vector in place │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:212 │ │ │ │ +_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_:_:_d_o_t │ │ │ │ +double dot(const V1 &a, const V2 &b) │ │ │ │ +Dot product. │ │ │ │ +DDeeffiinniittiioonn Vector.h:195 │ │ │ │ +_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_:_:_c_o_n_c_a_t_V_e_c_t_o_r_s │ │ │ │ +Vector concatVectors(const std::list< Vector > &vs) │ │ │ │ +concatenate Vectors │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:302 │ │ │ │ +_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_:_:_h_o_u_s_e │ │ │ │ +pair< double, Vector > house(const Vector &x) │ │ │ │ +house(x,j) computes HouseHolder vector v and scaling factor beta from x, such │ │ │ │ +that the corresponding ... │ │ │ │ +DDeeffiinniittiioonn Vector.cpp:237 │ │ │ │ +_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_e_r_t_i_c_a_l_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ + * _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/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/cholesky.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
VerticalBlockMatrix.cpp File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
cholesky.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

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

│ │ │ -

A matrix with column blocks of pre-defined sizes.

│ │ │ -

Used in JacobianFactor and GaussianConditional.

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

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

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Nov 5, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,35 @@ │ │ │ │ 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 | _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_. │ │ │ │ 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 ********** │ │ │ │ -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. │ │ │ │ +Efficient incomplete Cholesky on rank-deficient matrices, todo: constrained │ │ │ │ +Cholesky. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Nov 5, 2010 │ │ │ │ * _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 │ │ │ │ + * _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/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/ThreadsafeException.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,51 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Functions
│ │ │ -
VectorSerialization.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
ThreadsafeException.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

serialization for Vectors │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -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)
 

│ │ │ +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...
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Namespaces

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

Detailed Description

│ │ │ -

serialization for Vectors

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

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

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Aug 21, 2010
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,42 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_._._. │ │ │ │ _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) │ │ │ │ -  │ │ │ │ -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) │ │ │ │ +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_._._. │ │ │ │ +  │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -serialization for Vectors │ │ │ │ +Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ Date │ │ │ │ - February 2022 │ │ │ │ + Aug 21, 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 │ │ │ │ + * _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/a00071_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/VectorSerialization.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ThreadsafeException.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,81 +98,160 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
VectorSerialization.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
│ │ │ -
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 {
│ │ │ +
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// 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}
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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
│ │ │ +
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
│ │ │ +
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,77 +1,169 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -VectorSerialization.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_/_V_e_c_t_o_r_._h> │ │ │ │ -22 │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#include │ │ │ │ -26 │ │ │ │ -27namespace boost { │ │ │ │ -28namespace serialization { │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include // for GTSAM_USE_TBB │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ 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} │ │ │ │ +30#ifdef GTSAM_USE_TBB │ │ │ │ +31#include │ │ │ │ +32#include │ │ │ │ +33#include │ │ │ │ +34#endif │ │ │ │ +35 │ │ │ │ +36namespace _g_t_s_a_m { │ │ │ │ 37 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ +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_:_:_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 │ │ │ │ - * _V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._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/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/Matrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,186 +94,299 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Typedefs | │ │ │ Functions
│ │ │ -
Vector.h File Reference
│ │ │ +
Matrix.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

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 MKL_BLAS   MKL_DOMAIN_BLAS
 
#define GTSAM_MAKE_VECTOR_DEFS(N)
 
#define GTSAM_MAKE_MATRIX_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
 
│ │ │ +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

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
 
│ │ │ +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

│ │ │ -

typedef and functions to augment Eigen's VectorXd

│ │ │ -
Author
Kai Ni
│ │ │ +

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_VECTOR_DEFS

│ │ │ + │ │ │ +

◆ GTSAM_MAKE_MATRIX_DEFS

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
#define GTSAM_MAKE_VECTOR_DEFS#define GTSAM_MAKE_MATRIX_DEFS( N)
│ │ │
│ │ │ -Value:
using Vector##N = Eigen::Matrix<double, N, 1>; \
│ │ │ -
static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
│ │ │ +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,147 +1,308 @@ │ │ │ │ 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_._._. │ │ │ │ +_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 │ │ │ │ +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  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) │ │ │ │ +#define  _G_T_S_A_M___M_A_K_E___M_A_T_R_I_X___D_E_F_S(N) │ │ │ │   │ │ │ │ TTyyppeeddeeffss │ │ │ │ - typedef Eigen::VectorXd  ggttssaamm::::VVeeccttoorr │ │ │ │ -  │ │ │ │ - typedef Eigen::Matrix< double, 1, 1 >  ggttssaamm::::VVeeccttoorr11 │ │ │ │ + typedef Eigen::MatrixXd  ggttssaamm::::MMaattrriixx │ │ │ │   │ │ │ │ - typedef Eigen::Vector2d  ggttssaamm::::VVeeccttoorr22 │ │ │ │ +typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen:: │ │ │ │ + Dynamic, Eigen::RowMajor >  ggttssaamm::::MMaattrriixxRRoowwMMaajjoorr │ │ │ │   │ │ │ │ - typedef Eigen::Vector3d  ggttssaamm::::VVeeccttoorr33 │ │ │ │ + typedef Eigen::Block< Matrix >  ggttssaamm::::SSuubbMMaattrriixx │ │ │ │   │ │ │ │ - typedef Eigen::VectorBlock< Vector >  ggttssaamm::::SSuubbVVeeccttoorr │ │ │ │ -  │ │ │ │ -typedef Eigen::VectorBlock< const Vector >  ggttssaamm::::CCoonnssttSSuubbVVeeccttoorr │ │ │ │ + typedef Eigen::Block< const Matrix >  ggttssaamm::::CCoonnssttSSuubbMMaattrriixx │ │ │ │   │ │ │ │ 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. │ │ │ │ + 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) │ │ │ │   │ │ │ │ - double  ggttssaamm::::wweeiigghhtteeddPPsseeuuddooiinnvveerrssee (const Vector &a, const │ │ │ │ - Vector &weights, Vector &pseudo) │ │ │ │ + Matrix  ggttssaamm::::LLLLtt (const Matrix &A) │ │ │ │   │ │ │ │ - Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (const std::list< Vector > &vs) │ │ │ │ -  concatenate Vectors │ │ │ │ + Matrix  ggttssaamm::::RRttRR (const Matrix &A) │ │ │ │   │ │ │ │ - Vector  ggttssaamm::::ccoonnccaattVVeeccttoorrss (size_t nrVectors,...) │ │ │ │ -  concatenate Vectors │ │ │ │ + Vector  ggttssaamm::::ccoolluummnnNNoorrmmSSqquuaarree (const Matrix &A) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -typedef and functions to augment Eigen's VectorXd │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ Author │ │ │ │ + Christian Potthast │ │ │ │ Kai Ni │ │ │ │ Frank Dellaert │ │ │ │ + Alex Cunningham │ │ │ │ Alex Hagiopol │ │ │ │ Varun Agrawal │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? GGTTSSAAMM__MMAAKKEE__VVEECCTTOORR__DDEEFFSS ********** │ │ │ │ -#define GTSAM_MAKE_VECTOR_DEFS (   N ) │ │ │ │ +********** _?◆_? GGTTSSAAMM__MMAAKKEE__MMAATTRRIIXX__DDEEFFSS ********** │ │ │ │ +#define GTSAM_MAKE_MATRIX_DEFS (   N ) │ │ │ │ VVaalluuee:: │ │ │ │ -using Vector##N = Eigen::Matrix; \ │ │ │ │ -static const Eigen::MatrixBase::ConstantReturnType Z_##N##x1 = │ │ │ │ -Vector##N::Zero(); │ │ │ │ +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 │ │ │ │ - * _V_e_c_t_o_r_._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/a00074.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,23 +1,46 @@ │ │ │ │ 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] │ │ │ │ + ["gtsam::Reshape< OutM, OutN, OutOptions, InM, InN, InOptions >", "a02416.html", null], │ │ │ │ + ["gtsam::Reshape< M, M, InOptions, M, M, InOptions >", "a02420.html", null], │ │ │ │ + ["gtsam::Reshape< M, N, InOptions, M, N, InOptions >", "a02424.html", null], │ │ │ │ + ["gtsam::Reshape< N, M, InOptions, M, N, InOptions >", "a02428.html", null], │ │ │ │ + ["gtsam::MultiplyWithInverse< N >", "a02432.html", "a02432"], │ │ │ │ + ["gtsam::MultiplyWithInverseFunction< T, N >", "a02436.html", "a02436"], │ │ │ │ + ["assert_equal", "a00074.html#a3f9622226dfe06908f11b42bf0bdd22d", null], │ │ │ │ + ["assert_equal", "a00074.html#abb0e19bbbeaca95843e8161b89a12fda", null], │ │ │ │ + ["assert_inequal", "a00074.html#a7a116d0643f123ef3b15d91056506492", null], │ │ │ │ + ["backSubstituteLower", "a00074.html#a0d998e1b770c9864946ddb031b1c4522", null], │ │ │ │ + ["backSubstituteUpper", "a00074.html#a6c4876cbe85d5651a52eda0e97c60f2f", null], │ │ │ │ + ["backSubstituteUpper", "a00074.html#a8b0bf332d52b333dab2b20d763c8925b", null], │ │ │ │ + ["cholesky_inverse", "a00074.html#aba542e2cd85f08b76f80a0871a4ea713", null], │ │ │ │ + ["collect", "a00074.html#ad8b524ba6c9aed0d21a020999c9b5d88", null], │ │ │ │ + ["column", "a00074.html#a559dba69e2854eb66e34222f60f55722", null], │ │ │ │ + ["diag", "a00074.html#af1c32907adce74cf9edd6ee5bba5a085", null], │ │ │ │ + ["DLT", "a00074.html#ab2c65f1a69009a306b6a5f9ef31dcee2", null], │ │ │ │ + ["equal_with_abs_tol", "a00074.html#af31e657258505b2e5148846ebbaa3195", null], │ │ │ │ + ["expm", "a00074.html#ab15462d8c16813d0a7a5b1f76a2f64b7", null], │ │ │ │ + ["householder", "a00074.html#a7baa2f3184a444adce108633c0265e0c", null], │ │ │ │ + ["householder_", "a00074.html#abdd1ab05e8ac90b340fbd8f3b322dc6d", null], │ │ │ │ + ["inplace_QR", "a00074.html#a7eec9339ab5a008a28ddfaa6b2c94611", null], │ │ │ │ + ["insertSub", "a00074.html#ad1088fa2d1494e6a4123a6bc3f5c2d7e", null], │ │ │ │ + ["inverse_square_root", "a00074.html#aff78dee59ac0250432081f39deb5f6d1", null], │ │ │ │ + ["linear_dependent", "a00074.html#a4b81794af72954abafbb726fc712f5db", null], │ │ │ │ + ["linear_independent", "a00074.html#ad8f0349471464c1fb515819d9503849a", null], │ │ │ │ + ["operator!=", "a00074.html#ab235abf7505b634be2165e0db58239dd", null], │ │ │ │ + ["operator==", "a00074.html#afd5b3cf3f54adcbdd6d9e7403f1a792f", null], │ │ │ │ + ["operator>>", "a00074.html#a7d85957bab2d18cf56ab9aaf95a106de", null], │ │ │ │ + ["operator^", "a00074.html#a2218e53a2b99c449e70aa5b7805895fc", null], │ │ │ │ + ["print", "a00074.html#a54fa43c89c5334314c8c75939dd5c2d7", null], │ │ │ │ + ["print", "a00074.html#a44ead03912d5dcf094d8421e1702ee71", null], │ │ │ │ + ["prod", "a00074.html#abc29e3164ed30e785a3c48dfd1aa6ca5", null], │ │ │ │ + ["qr", "a00074.html#ae32c295e2c40c1e85f146a8a6266eaa8", null], │ │ │ │ + ["row", "a00074.html#a2754f325c8600303d627d9e8cf1f9949", null], │ │ │ │ + ["save", "a00074.html#a3eb7eed9019d3fda8fcf74fbf85b85c9", null], │ │ │ │ + ["skewSymmetric", "a00074.html#a97f108d19e52c83c331c55d35b23796e", null], │ │ │ │ + ["stack", "a00074.html#a5c82884a356ddd09229a5283aed04df9", null], │ │ │ │ + ["sub", "a00074.html#a9ae1d9fe2ccad044fbb88b5c1d9e035a", null], │ │ │ │ + ["svd", "a00074.html#a8d7e46204d953f64a39445599dbd7eee", null], │ │ │ │ + ["trans", "a00074.html#aa2e36d7ab63000feddaeb61bbfcf2db1", null], │ │ │ │ + ["vector_scale_inplace", "a00074.html#a24d3ad0252f91f0ec301593c45cf5af7", null], │ │ │ │ + ["weighted_eliminate", "a00074.html#a60019a03f26b92c6b2a08e43d153d4c0", null], │ │ │ │ + ["zeroBelowDiagonal", "a00074.html#a57edf6ed7312f63d35f73233665c334d", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00074_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Vector.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,192 +98,397 @@ │ │ │
No Matches
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Vector.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)
│ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
21// \callgraph
│ │ │ -
22
│ │ │ -
23#pragma once
│ │ │ -
24#ifndef MKL_BLAS
│ │ │ -
25#define MKL_BLAS MKL_DOMAIN_BLAS
│ │ │ -
26#endif
│ │ │ -
27
│ │ │ - │ │ │ -
29#include <Eigen/Core>
│ │ │ -
30#include <iosfwd>
│ │ │ -
31#include <list>
│ │ │ +
23// \callgraph
│ │ │ +
24
│ │ │ +
25#pragma once
│ │ │ +
26
│ │ │ + │ │ │ +
28#include <gtsam/base/Vector.h>
│ │ │ +
29#include <boost/tuple/tuple.hpp>
│ │ │ +
30
│ │ │ +
31#include <vector>
│ │ │
32
│ │ │ -
33namespace gtsam {
│ │ │ -
34
│ │ │ -
35// Vector is just a typedef of the Eigen dynamic vector type
│ │ │ -
36
│ │ │ -
37// Typedef arbitary length vector
│ │ │ -
38typedef Eigen::VectorXd Vector;
│ │ │ +
38namespace gtsam {
│ │ │
39
│ │ │ -
40// Commonly used fixed size vectors
│ │ │ -
41typedef Eigen::Matrix<double, 1, 1> Vector1;
│ │ │ -
42typedef Eigen::Vector2d Vector2;
│ │ │ -
43typedef Eigen::Vector3d Vector3;
│ │ │ -
44
│ │ │ -
45static const Eigen::MatrixBase<Vector2>::ConstantReturnType Z_2x1 = Vector2::Zero();
│ │ │ -
46static const Eigen::MatrixBase<Vector3>::ConstantReturnType Z_3x1 = Vector3::Zero();
│ │ │ -
47
│ │ │ -
48// Create handy typedefs and constants for vectors with N>3
│ │ │ -
49// VectorN and Z_Nx1, for N=1..9
│ │ │ -
50#define GTSAM_MAKE_VECTOR_DEFS(N) \
│ │ │ -
51 using Vector##N = Eigen::Matrix<double, N, 1>; \
│ │ │ -
52 static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
│ │ │ -
53
│ │ │ -
54GTSAM_MAKE_VECTOR_DEFS(4)
│ │ │ -
55GTSAM_MAKE_VECTOR_DEFS(5)
│ │ │ -
56GTSAM_MAKE_VECTOR_DEFS(6)
│ │ │ -
57GTSAM_MAKE_VECTOR_DEFS(7)
│ │ │ -
58GTSAM_MAKE_VECTOR_DEFS(8)
│ │ │ -
59GTSAM_MAKE_VECTOR_DEFS(9)
│ │ │ -
60GTSAM_MAKE_VECTOR_DEFS(10)
│ │ │ -
61GTSAM_MAKE_VECTOR_DEFS(11)
│ │ │ -
62GTSAM_MAKE_VECTOR_DEFS(12)
│ │ │ -
63GTSAM_MAKE_VECTOR_DEFS(15)
│ │ │ -
64
│ │ │ -
65typedef Eigen::VectorBlock<Vector> SubVector;
│ │ │ -
66typedef Eigen::VectorBlock<const Vector> ConstSubVector;
│ │ │ -
67
│ │ │ -
73#if defined(GTSAM_EIGEN_VERSION_WORLD)
│ │ │ -
74static_assert(
│ │ │ -
75 GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION &&
│ │ │ -
76 GTSAM_EIGEN_VERSION_MAJOR==EIGEN_MAJOR_VERSION,
│ │ │ -
77 "Error: GTSAM was built against a different version of Eigen");
│ │ │ -
78#endif
│ │ │ -
79
│ │ │ -
96GTSAM_EXPORT bool fpEqual(double a, double b, double tol,
│ │ │ -
97 bool check_relative_also = true);
│ │ │ -
98
│ │ │ -
102GTSAM_EXPORT void print(const Vector& v, const std::string& s, std::ostream& stream);
│ │ │ +
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
│ │ │ -
107GTSAM_EXPORT void print(const Vector& v, const std::string& s = "");
│ │ │ -
108
│ │ │ -
112GTSAM_EXPORT void save(const Vector& A, const std::string &s, const std::string& filename);
│ │ │ -
113
│ │ │ -
117GTSAM_EXPORT bool operator==(const Vector& vec1,const Vector& vec2);
│ │ │ -
118
│ │ │ -
124GTSAM_EXPORT bool greaterThanOrEqual(const Vector& v1, const Vector& v2);
│ │ │ +
│ │ │ +
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 equal_with_abs_tol(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ -
130GTSAM_EXPORT bool equal_with_abs_tol(const SubVector& vec1, const SubVector& vec2, double tol=1e-9);
│ │ │ -
131
│ │ │ -
│ │ │ -
135inline bool equal(const Vector& vec1, const Vector& vec2, double tol) {
│ │ │ -
136 return equal_with_abs_tol(vec1, vec2, tol);
│ │ │ -
137}
│ │ │ -
│ │ │ -
138
│ │ │ -
│ │ │ -
142inline bool equal(const Vector& vec1, const Vector& vec2) {
│ │ │ -
143 return equal_with_abs_tol(vec1, vec2);
│ │ │ -
144}
│ │ │ -
│ │ │ -
145
│ │ │ -
153GTSAM_EXPORT bool assert_equal(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ -
154
│ │ │ -
162GTSAM_EXPORT bool assert_inequal(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ +
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
│ │ │ -
171GTSAM_EXPORT bool assert_equal(const SubVector& vec1, const SubVector& vec2, double tol=1e-9);
│ │ │ -
172GTSAM_EXPORT bool assert_equal(const ConstSubVector& vec1, const ConstSubVector& vec2, double tol=1e-9);
│ │ │ -
173
│ │ │ -
181GTSAM_EXPORT bool linear_dependent(const Vector& vec1, const Vector& vec2, double tol=1e-9);
│ │ │ -
182
│ │ │ -
189GTSAM_EXPORT Vector ediv_(const Vector &a, const Vector &b);
│ │ │ -
190
│ │ │ -
194template<class V1, class V2>
│ │ │ +
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>
│ │ │
│ │ │ -
195inline double dot(const V1 &a, const V2& b) {
│ │ │ -
196 assert (b.size()==a.size());
│ │ │ -
197 return a.dot(b);
│ │ │ -
198}
│ │ │ -
│ │ │ -
199
│ │ │ -
201template<class V1, class V2>
│ │ │ -
│ │ │ -
202inline double inner_prod(const V1 &a, const V2& b) {
│ │ │ -
203 assert (b.size()==a.size());
│ │ │ -
204 return a.dot(b);
│ │ │ -
205}
│ │ │ -
│ │ │ -
206
│ │ │ -
207#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
212inline void GTSAM_DEPRECATED scal(double alpha, Vector& x) { x *= alpha; }
│ │ │ -
213
│ │ │ -
218template<class V1, class V2>
│ │ │ -
219inline void GTSAM_DEPRECATED axpy(double alpha, const V1& x, V2& y) {
│ │ │ -
220 assert (y.size()==x.size());
│ │ │ -
221 y += alpha * x;
│ │ │ -
222}
│ │ │ -
223inline void axpy(double alpha, const Vector& x, SubVector y) {
│ │ │ -
224 assert (y.size()==x.size());
│ │ │ -
225 y += alpha * x;
│ │ │ -
226}
│ │ │ -
227#endif
│ │ │ -
228
│ │ │ -
234GTSAM_EXPORT std::pair<double,Vector> house(const Vector &x);
│ │ │ -
235
│ │ │ -
237GTSAM_EXPORT double houseInPlace(Vector &x);
│ │ │ +
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
│ │ │ -
249GTSAM_EXPORT std::pair<Vector, double>
│ │ │ -
250weightedPseudoinverse(const Vector& v, const Vector& weights);
│ │ │ -
251
│ │ │ -
252/*
│ │ │ -
253 * Fast version *no error checking* !
│ │ │ -
254 * Pass in initialized vector pseudo of size(weights) or will crash !
│ │ │ -
255 * @return the precision, pseudoinverse in third argument
│ │ │ -
256 */
│ │ │ -
257GTSAM_EXPORT double weightedPseudoinverse(const Vector& a, const Vector& weights, Vector& pseudo);
│ │ │ -
258
│ │ │ -
262GTSAM_EXPORT Vector concatVectors(const std::list<Vector>& vs);
│ │ │ -
263
│ │ │ -
267GTSAM_EXPORT Vector concatVectors(size_t nrVectors, ...);
│ │ │ -
268} // namespace gtsam
│ │ │ -
Included from all GTSAM files.
│ │ │ +
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.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Vector ediv_(const Vector &a, const Vector &b)
elementwise division, but 0/0 = 0, not inf
Definition Vector.cpp:199
│ │ │ -
bool greaterThanOrEqual(const Vector &vec1, const Vector &vec2)
Greater than or equal to operation returns true if all elements in v1 are greater than corresponding ...
Definition Vector.cpp:114
│ │ │ +
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
│ │ │ -
double inner_prod(const V1 &a, const V2 &b)
compatibility version for ublas' inner_prod()
Definition Vector.h:202
│ │ │
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ -
void axpy(double alpha, const Errors &x, Errors &y)
BLAS level 2 style AXPY, y := alpha*x + y
Definition Errors.cpp:111
│ │ │ +
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
│ │ │ -
double houseInPlace(Vector &v)
beta = house(x) computes the HouseHolder vector in place
Definition Vector.cpp:212
│ │ │ -
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition Testable.h:84
│ │ │ -
double dot(const V1 &a, const V2 &b)
Dot product.
Definition Vector.h:195
│ │ │ +
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
│ │ │ -
Vector concatVectors(const std::list< Vector > &vs)
concatenate Vectors
Definition Vector.cpp:302
│ │ │ +
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
│ │ │ -
pair< double, Vector > house(const Vector &x)
house(x,j) computes HouseHolder vector v and scaling factor beta from x, such that the corresponding ...
Definition Vector.cpp:237
│ │ │
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,247 +1,534 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Vector.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) │ │ │ │ 7 │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ -21// \callgraph │ │ │ │ -22 │ │ │ │ -23#pragma once │ │ │ │ -24#ifndef MKL_BLAS │ │ │ │ -25#define MKL_BLAS MKL_DOMAIN_BLAS │ │ │ │ -26#endif │ │ │ │ -27 │ │ │ │ -28#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ +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 │ │ │ │ -33namespace _g_t_s_a_m { │ │ │ │ -34 │ │ │ │ -35// Vector is just a typedef of the Eigen dynamic vector type │ │ │ │ -36 │ │ │ │ -37// Typedef arbitary length vector │ │ │ │ -38typedef Eigen::VectorXd Vector; │ │ │ │ +38namespace _g_t_s_a_m { │ │ │ │ 39 │ │ │ │ -40// Commonly used fixed size vectors │ │ │ │ -41typedef Eigen::Matrix Vector1; │ │ │ │ -42typedef Eigen::Vector2d Vector2; │ │ │ │ -43typedef Eigen::Vector3d Vector3; │ │ │ │ -44 │ │ │ │ -45static const Eigen::MatrixBase::ConstantReturnType Z_2x1 = Vector2:: │ │ │ │ -Zero(); │ │ │ │ -46static const Eigen::MatrixBase::ConstantReturnType Z_3x1 = Vector3:: │ │ │ │ -Zero(); │ │ │ │ -47 │ │ │ │ -48// Create handy typedefs and constants for vectors with N>3 │ │ │ │ -49// VectorN and Z_Nx1, for N=1..9 │ │ │ │ -50#define GTSAM_MAKE_VECTOR_DEFS(N) \ │ │ │ │ -51 using Vector##N = Eigen::Matrix; \ │ │ │ │ -52 static const Eigen::MatrixBase::ConstantReturnType Z_##N##x1 = │ │ │ │ -Vector##N::Zero(); │ │ │ │ -53 │ │ │ │ -54GTSAM_MAKE_VECTOR_DEFS(4) │ │ │ │ -55GTSAM_MAKE_VECTOR_DEFS(5) │ │ │ │ -56GTSAM_MAKE_VECTOR_DEFS(6) │ │ │ │ -57GTSAM_MAKE_VECTOR_DEFS(7) │ │ │ │ -58GTSAM_MAKE_VECTOR_DEFS(8) │ │ │ │ -59GTSAM_MAKE_VECTOR_DEFS(9) │ │ │ │ -60GTSAM_MAKE_VECTOR_DEFS(10) │ │ │ │ -61GTSAM_MAKE_VECTOR_DEFS(11) │ │ │ │ -62GTSAM_MAKE_VECTOR_DEFS(12) │ │ │ │ -63GTSAM_MAKE_VECTOR_DEFS(15) │ │ │ │ -64 │ │ │ │ -65typedef Eigen::VectorBlock SubVector; │ │ │ │ -66typedef Eigen::VectorBlock ConstSubVector; │ │ │ │ -67 │ │ │ │ -73#if defined(GTSAM_EIGEN_VERSION_WORLD) │ │ │ │ -74static_assert( │ │ │ │ -75 GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION && │ │ │ │ -76 GTSAM_EIGEN_VERSION_MAJOR==EIGEN_MAJOR_VERSION, │ │ │ │ -77 "Error: GTSAM was built against a different version of Eigen"); │ │ │ │ -78#endif │ │ │ │ -79 │ │ │ │ -96GTSAM_EXPORT bool _f_p_E_q_u_a_l(double a, double b, double tol, │ │ │ │ -97 bool check_relative_also = true); │ │ │ │ -98 │ │ │ │ -102GTSAM_EXPORT void _p_r_i_n_t(const Vector& v, const std::string& s, std::ostream& │ │ │ │ -stream); │ │ │ │ +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 _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const Vector& vec1, const Vector& vec2, │ │ │ │ -double tol=1e-9); │ │ │ │ -130GTSAM_EXPORT bool _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(const SubVector& vec1, const SubVector& │ │ │ │ -vec2, double tol=1e-9); │ │ │ │ -131 │ │ │ │ -_1_3_5inline bool _e_q_u_a_l(const Vector& vec1, const Vector& vec2, double tol) { │ │ │ │ -136 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(vec1, vec2, tol); │ │ │ │ -137} │ │ │ │ -138 │ │ │ │ -_1_4_2inline bool _e_q_u_a_l(const Vector& vec1, const Vector& vec2) { │ │ │ │ -143 return _e_q_u_a_l___w_i_t_h___a_b_s___t_o_l(vec1, vec2); │ │ │ │ -144} │ │ │ │ -145 │ │ │ │ -153GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const Vector& vec1, const Vector& vec2, │ │ │ │ -double tol=1e-9); │ │ │ │ -154 │ │ │ │ -162GTSAM_EXPORT bool _a_s_s_e_r_t___i_n_e_q_u_a_l(const Vector& vec1, const Vector& vec2, │ │ │ │ -double tol=1e-9); │ │ │ │ +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 │ │ │ │ -171GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const SubVector& vec1, const SubVector& vec2, │ │ │ │ -double tol=1e-9); │ │ │ │ -172GTSAM_EXPORT bool _a_s_s_e_r_t___e_q_u_a_l(const ConstSubVector& vec1, const │ │ │ │ -ConstSubVector& vec2, double tol=1e-9); │ │ │ │ -173 │ │ │ │ -181GTSAM_EXPORT bool _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); │ │ │ │ -182 │ │ │ │ -189GTSAM_EXPORT Vector _e_d_i_v__(const Vector &a, const Vector &b); │ │ │ │ -190 │ │ │ │ -194template │ │ │ │ -_1_9_5inline double _d_o_t(const V1 &a, const V2& b) { │ │ │ │ -196 assert (b.size()==a.size()); │ │ │ │ -197 return a.dot(b); │ │ │ │ -198} │ │ │ │ -199 │ │ │ │ -201template │ │ │ │ -_2_0_2inline double _i_n_n_e_r___p_r_o_d(const V1 &a, const V2& b) { │ │ │ │ -203 assert (b.size()==a.size()); │ │ │ │ -204 return a.dot(b); │ │ │ │ -205} │ │ │ │ -206 │ │ │ │ -207#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -212inline void GTSAM_DEPRECATED scal(double alpha, Vector& x) { x *= alpha; } │ │ │ │ -213 │ │ │ │ -218template │ │ │ │ -219inline void GTSAM_DEPRECATED _a_x_p_y(double alpha, const V1& x, V2& y) { │ │ │ │ -220 assert (y.size()==x.size()); │ │ │ │ -221 y += alpha * x; │ │ │ │ -222} │ │ │ │ -223inline void _a_x_p_y(double alpha, const Vector& x, SubVector y) { │ │ │ │ -224 assert (y.size()==x.size()); │ │ │ │ -225 y += alpha * x; │ │ │ │ -226} │ │ │ │ -227#endif │ │ │ │ -228 │ │ │ │ -234GTSAM_EXPORT std::pair _h_o_u_s_e(const Vector &x); │ │ │ │ -235 │ │ │ │ -237GTSAM_EXPORT double _h_o_u_s_e_I_n_P_l_a_c_e(Vector &x); │ │ │ │ +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 │ │ │ │ -250weightedPseudoinverse(const Vector& v, const Vector& weights); │ │ │ │ -251 │ │ │ │ -252/* │ │ │ │ -253 * Fast version *no error checking* ! │ │ │ │ -254 * Pass in initialized vector pseudo of size(weights) or will crash ! │ │ │ │ -255 * @return the precision, pseudoinverse in third argument │ │ │ │ -256 */ │ │ │ │ -257GTSAM_EXPORT double weightedPseudoinverse(const Vector& a, const Vector& │ │ │ │ -weights, Vector& pseudo); │ │ │ │ -258 │ │ │ │ -262GTSAM_EXPORT Vector _c_o_n_c_a_t_V_e_c_t_o_r_s(const std::list& vs); │ │ │ │ -263 │ │ │ │ -267GTSAM_EXPORT Vector _c_o_n_c_a_t_V_e_c_t_o_r_s(size_t nrVectors, ...); │ │ │ │ -268} // namespace gtsam │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +_2_4_2inline Matrix _t_r_a_n_s(const Matrix& A) { return A.transpose(); } │ │ │ │ +243 │ │ │ │ +245template │ │ │ │ +_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. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_d_i_v__ │ │ │ │ -Vector ediv_(const Vector &a, const Vector &b) │ │ │ │ -elementwise division, but 0/0 = 0, not inf │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:199 │ │ │ │ -_g_t_s_a_m_:_:_g_r_e_a_t_e_r_T_h_a_n_O_r_E_q_u_a_l │ │ │ │ -bool greaterThanOrEqual(const Vector &vec1, const Vector &vec2) │ │ │ │ -Greater than or equal to operation returns true if all elements in v1 are │ │ │ │ -greater than corresponding ... │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:114 │ │ │ │ +_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_:_:_i_n_n_e_r___p_r_o_d │ │ │ │ -double inner_prod(const V1 &a, const V2 &b) │ │ │ │ -compatibility version for ublas' inner_prod() │ │ │ │ -DDeeffiinniittiioonn Vector.h:202 │ │ │ │ _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_x_p_y │ │ │ │ -void axpy(double alpha, const Errors &x, Errors &y) │ │ │ │ -BLAS level 2 style AXPY, y := alpha*x + y │ │ │ │ -DDeeffiinniittiioonn Errors.cpp:111 │ │ │ │ +_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_I_n_P_l_a_c_e │ │ │ │ -double houseInPlace(Vector &v) │ │ │ │ -beta = house(x) computes the HouseHolder vector in place │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:212 │ │ │ │ -_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_:_:_d_o_t │ │ │ │ -double dot(const V1 &a, const V2 &b) │ │ │ │ -Dot product. │ │ │ │ -DDeeffiinniittiioonn Vector.h:195 │ │ │ │ +_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_:_:_c_o_n_c_a_t_V_e_c_t_o_r_s │ │ │ │ -Vector concatVectors(const std::list< Vector > &vs) │ │ │ │ -concatenate Vectors │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:302 │ │ │ │ +_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_:_:_h_o_u_s_e │ │ │ │ -pair< double, Vector > house(const Vector &x) │ │ │ │ -house(x,j) computes HouseHolder vector v and scaling factor beta from x, such │ │ │ │ -that the corresponding ... │ │ │ │ -DDeeffiinniittiioonn Vector.cpp:237 │ │ │ │ _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 │ │ │ │ - * _V_e_c_t_o_r_._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/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/Testable.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,122 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
Value.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
Testable.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Concept check for values that can be used in unit tests. │ │ │ 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::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.
 
│ │ │

Detailed Description

│ │ │ -

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

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

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,28 +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 │ │ │ │ -Value.h File Reference │ │ │ │ -The base class for any variable that can be optimized or used in a factor. │ │ │ │ -_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_:_:_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_:_:_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_._._. │ │ │ │ +  │ │ │ │ +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 ********** │ │ │ │ -The base class for any variable that can be optimized or used in a factor. │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Date │ │ │ │ - Jan 14, 2012 │ │ │ │ + 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 │ │ │ │ - * _V_a_l_u_e_._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/a00080.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,10 @@ │ │ │ │ var a00080 = [ │ │ │ │ - ["gtsam::Value", "a02596.html", "a02596"] │ │ │ │ + ["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", "a00080.html#abe0a238cdd07d484ff0be56ae945b182", null], │ │ │ │ + ["assert_equal", "a00080.html#a659619cca082d1c10b07c033d48c54da", null], │ │ │ │ + ["equal", "a00080.html#a1f3dc67ad88b799c469088e428c583b1", null], │ │ │ │ + ["equal", "a00080.html#ad2dbee4a72127938c79162cc8b6d5152", null] │ │ │ │ ]; │ │ ├── ./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/Testable.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,100 +98,171 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Value.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 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │ -
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
│ │ │ -
│ │ │ -
37 class GTSAM_EXPORT Value {
│ │ │ -
38 public:
│ │ │ -
39
│ │ │ -
41 virtual Value* clone_() const = 0;
│ │ │ -
42
│ │ │ -
44 virtual void deallocate_() const = 0;
│ │ │ +
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
│ │ │ -
47 virtual boost::shared_ptr<Value> clone() const = 0;
│ │ │ +
46 // Forward declaration
│ │ │ +
47 template <typename T> struct traits;
│ │ │
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;
│ │ │ -
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;
│ │ │ +
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 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
│ │ │ +
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>
│ │ │ +
│ │ │ + │ │ │ +
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 };
│ │ │ +
│ │ │ +
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
│ │ │ -
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)
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,119 +1,175 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Value.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 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 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> │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -_4_7 virtual boost::shared_ptr _c_l_o_n_e() const = 0; │ │ │ │ +46 // Forward declaration │ │ │ │ +47 template struct traits; │ │ │ │ 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; │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ +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 { │ │ │ │ +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 { │ │ │ │ +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; │ │ │ │ _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_:_:_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * _V_a_l_u_e_._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/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/chartTesting.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,160 +98,95 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ThreadsafeException.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
│ │ │ -
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>
│ │ │ -
│ │ │ - │ │ │ -
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_;
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,169 +1,95 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -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_. │ │ │ │ +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 │ │ │ │ -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__; │ │ │ │ +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 │ │ │ │ -_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 │ │ │ │ -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 │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ - * _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._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/a00086.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/TestableAssertions.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Matrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,103 +96,157 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
TestableAssertions.h File Reference
│ │ │ +
Matrix.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

matrix class │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ Functions

│ │ │ -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.
 
│ │ │ +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

│ │ │ -

Provides additional testing facilities for common data structures.

│ │ │ -
Author
Alex Cunningham
│ │ │ +

matrix class

│ │ │ +
Author
Christian Potthast
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,90 +1,179 @@ │ │ │ │ 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 │ │ │ │ -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_. │ │ │ │ +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 _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. │ │ │ │ + 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 ********** │ │ │ │ -Provides additional testing facilities for common data structures. │ │ │ │ +matrix class │ │ │ │ Author │ │ │ │ - Alex Cunningham │ │ │ │ + Christian Potthast │ │ │ │ * _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 │ │ │ │ + * _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/a00086.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,14 +1,29 @@ │ │ │ │ var a00086 = [ │ │ │ │ - ["assert_container_equal", "a00086.html#a2f509195ea2180d0f7dbd3a99a088ff4", null], │ │ │ │ - ["assert_container_equal", "a00086.html#a254be27d6d4b416fa2b546c77ae783fc", null], │ │ │ │ - ["assert_container_equal", "a00086.html#a0eec17f894b358dd9f30d7af28082ba5", null], │ │ │ │ - ["assert_container_equal", "a00086.html#a6d6b2964354593f69848f6bf5d3e0ca1", null], │ │ │ │ - ["assert_container_equality", "a00086.html#a59ba6a7db27344c5cb021f1421905020", null], │ │ │ │ - ["assert_container_equality", "a00086.html#aa0926a5d779171bd8e1d30fb5982b5c0", null], │ │ │ │ - ["assert_equal", "a00086.html#add6d6575582314cc9b5dbdbe2a86374d", null], │ │ │ │ - ["assert_equal", "a00086.html#a982034802415eb6e9bd02355257ed96a", null], │ │ │ │ - ["assert_equal", "a00086.html#a21e760bc75888053afd86a27d56b6148", null], │ │ │ │ - ["assert_inequal", "a00086.html#a2f19ba6625a264457805513fefcb5c32", null], │ │ │ │ - ["assert_print_equal", "a00086.html#a830c8c65902d7d0e763562e6c9357346", null], │ │ │ │ - ["assert_stdout_equal", "a00086.html#a08641f0f7145716bba9159dd95099a44", null] │ │ │ │ + ["assert_equal", "a00086.html#a3f9622226dfe06908f11b42bf0bdd22d", null], │ │ │ │ + ["assert_equal", "a00086.html#abb0e19bbbeaca95843e8161b89a12fda", null], │ │ │ │ + ["assert_inequal", "a00086.html#a7a116d0643f123ef3b15d91056506492", null], │ │ │ │ + ["backSubstituteLower", "a00086.html#a0d998e1b770c9864946ddb031b1c4522", null], │ │ │ │ + ["backSubstituteUpper", "a00086.html#a6c4876cbe85d5651a52eda0e97c60f2f", null], │ │ │ │ + ["backSubstituteUpper", "a00086.html#a8b0bf332d52b333dab2b20d763c8925b", null], │ │ │ │ + ["cholesky_inverse", "a00086.html#aba542e2cd85f08b76f80a0871a4ea713", null], │ │ │ │ + ["collect", "a00086.html#ad8b524ba6c9aed0d21a020999c9b5d88", null], │ │ │ │ + ["diag", "a00086.html#af1c32907adce74cf9edd6ee5bba5a085", null], │ │ │ │ + ["DLT", "a00086.html#ab2c65f1a69009a306b6a5f9ef31dcee2", null], │ │ │ │ + ["expm", "a00086.html#ab15462d8c16813d0a7a5b1f76a2f64b7", null], │ │ │ │ + ["householder", "a00086.html#a7baa2f3184a444adce108633c0265e0c", null], │ │ │ │ + ["householder_", "a00086.html#abdd1ab05e8ac90b340fbd8f3b322dc6d", null], │ │ │ │ + ["inplace_QR", "a00086.html#a7eec9339ab5a008a28ddfaa6b2c94611", null], │ │ │ │ + ["inverse_square_root", "a00086.html#aff78dee59ac0250432081f39deb5f6d1", null], │ │ │ │ + ["linear_dependent", "a00086.html#a4b81794af72954abafbb726fc712f5db", null], │ │ │ │ + ["linear_independent", "a00086.html#ad8f0349471464c1fb515819d9503849a", null], │ │ │ │ + ["operator>>", "a00086.html#a7d85957bab2d18cf56ab9aaf95a106de", null], │ │ │ │ + ["operator^", "a00086.html#a2218e53a2b99c449e70aa5b7805895fc", null], │ │ │ │ + ["print", "a00086.html#a54fa43c89c5334314c8c75939dd5c2d7", null], │ │ │ │ + ["print", "a00086.html#a44ead03912d5dcf094d8421e1702ee71", null], │ │ │ │ + ["qr", "a00086.html#ae32c295e2c40c1e85f146a8a6266eaa8", null], │ │ │ │ + ["save", "a00086.html#a3eb7eed9019d3fda8fcf74fbf85b85c9", null], │ │ │ │ + ["stack", "a00086.html#a5c82884a356ddd09229a5283aed04df9", null], │ │ │ │ + ["svd", "a00086.html#a8d7e46204d953f64a39445599dbd7eee", null], │ │ │ │ + ["vector_scale_inplace", "a00086.html#a24d3ad0252f91f0ec301593c45cf5af7", null], │ │ │ │ + ["weighted_eliminate", "a00086.html#a60019a03f26b92c6b2a08e43d153d4c0", null] │ │ │ │ ]; │ │ ├── ./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/SymmetricBlockMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,122 +95,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
Testable.h File Reference
│ │ │ +Namespaces
│ │ │ +
SymmetricBlockMatrix.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Access to matrices via blocks of pre-defined sizes. │ │ │ 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...
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -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

│ │ │ -

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
│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +

Access to matrices via blocks of pre-defined sizes.

│ │ │ +

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,84 +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 | _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_._._. │ │ │ │ +_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_._._. │ │ │ │ _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_._._. │ │ │ │ -  │ │ │ │ -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_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ -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 ********** │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ +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 │ │ │ │ - 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 │ │ │ │ + Richard Roberts │ │ │ │ + Date │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _T_e_s_t_a_b_l_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/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/SymmetricBlockMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,171 +98,439 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Testable.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
│ │ │ -
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());
│ │ │ - │ │ │ +
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;
│ │ │ +
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
│ │ │ -
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 }
│ │ │ +
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 }
│ │ │
│ │ │
87
│ │ │ -
89 template<class T>
│ │ │ +
89 template<typename CONTAINER>
│ │ │
│ │ │ -
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 };
│ │ │ -
│ │ │ +
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
│ │ │ -
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 };
│ │ │ -
│ │ │ -
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>;
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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 };
│ │ │ +
│ │ │ +
400
│ │ │ +
402 class CholeskyFailed;
│ │ │ +
403
│ │ │ +
404}
│ │ │ +
Typedefs for easier changing of types.
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,175 +1,546 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Testable.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 │ │ │ │ -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); │ │ │ │ +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; │ │ │ │ +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 │ │ │ │ -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); │ │ │ │ +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 } │ │ │ │ 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 }; │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -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 }; │ │ │ │ -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; │ │ │ │ +_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 │ │ │ │ +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} │ │ │ │ +_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. │ │ │ │ +_M_a_t_r_i_x_._h │ │ │ │ +typedef and functions to augment Eigen's MatrixXd │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ - * _T_e_s_t_a_b_l_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/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/serializationTestHelpers.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,114 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
SymmetricBlockMatrix.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
serializationTestHelpers.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Access to matrices via blocks of pre-defined sizes. │ │ │ -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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ 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
 
│ │ │

Detailed Description

│ │ │ -

Access to matrices via blocks of pre-defined sizes.

│ │ │ -

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ -
Date
Sep 18, 2010
│ │ │ +
Author
Alex Cunningham
│ │ │ +
│ │ │ +Richard Roberts
│ │ │ +
Date
Feb 7, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,92 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_. │ │ │ │ -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_._._. │ │ │ │ -  │ │ │ │ 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 │ │ │ │ +  │ │ │ │ ********** 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. │ │ │ │ Author │ │ │ │ + Alex Cunningham │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Feb 7, 2012 │ │ │ │ * _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 │ │ │ │ + * _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/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/serializationTestHelpers.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,439 +98,202 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
SymmetricBlockMatrix.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
│ │ │ -
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 */
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
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 {
│ │ │ -
36
│ │ │ -
37 // Forward declarations
│ │ │ -
38 class VerticalBlockMatrix;
│ │ │ -
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:
│ │ │ - │ │ │ +
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
│ │ │ -
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 }
│ │ │ -
│ │ │ -
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_]; }
│ │ │ -
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;
│ │ │ +
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
│ │ │ +
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
│ │ │ -
│ │ │ -
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 };
│ │ │ -
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
bool deserializeFromXMLFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from an XML file
Definition serialization.h:174
│ │ │ +
std::string serialize(const T &input)
serializes to a string
Definition serialization.h:113
│ │ │ +
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 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
│ │ │ +
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
│ │ │ +
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
│ │ │ +
bool deserializeFromBinaryFile(const std::string &filename, T &output, const std::string &name="data")
deserializes from a binary file
Definition serialization.h:248
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,546 +1,239 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SymmetricBlockMatrix.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 │ │ │ │ -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 */ │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +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 { │ │ │ │ -36 │ │ │ │ -37 // Forward declarations │ │ │ │ -38 class VerticalBlockMatrix; │ │ │ │ -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(); │ │ │ │ +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 │ │ │ │ -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 } │ │ │ │ -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_]; } │ │ │ │ -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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -_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} │ │ │ │ -_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 │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ +std::string serialize(const T &input) │ │ │ │ +serializes to a string │ │ │ │ +DDeeffiinniittiioonn serialization.h:113 │ │ │ │ +_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_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_:_:_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_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_:_:_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_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._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/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/debug.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,61 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
SymmetricBlockMatrix.cpp File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions
│ │ │ +
debug.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Global debugging flags. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ 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

│ │ │ -

Access to matrices via blocks of pre-defined sizes.

│ │ │ -

Used in GaussianFactor and GaussianConditional.

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

Global debugging flags.

│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
Feb 1, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,35 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_. │ │ │ │ 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 ********** │ │ │ │ -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. │ │ │ │ +Global debugging flags. │ │ │ │ Author │ │ │ │ Richard Roberts │ │ │ │ Date │ │ │ │ - Sep 18, 2010 │ │ │ │ + Feb 1, 2011 │ │ │ │ * _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 │ │ │ │ + * _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/a00098_source.html │ │ │ @@ -114,15 +114,15 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------1------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ -
21#include <gtsam/base/Lie.h>
│ │ │ +
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> {
│ │ │ @@ -266,15 +266,15 @@ │ │ │
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.
│ │ │ +
Base class and basic functions for Lie types.
│ │ │
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
│ │ │
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
│ │ │
│ │ ├── ./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/DSFVector.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,53 +96,46 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
OptionalJacobian.h File Reference
│ │ │ +
DSFVector.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Special class for optional Jacobian arguments. │ │ │ +

A faster implementation for DSF, which uses vector rather than btree. │ │ │ 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::DSFBase
 A fast implementation of disjoint set forests that uses vector as underly data structure. 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...
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.
 
│ │ │

Detailed Description

│ │ │ -

Special class for optional Jacobian arguments.

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

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

│ │ │ +
Date
Jun 25, 2010
│ │ │ +
Author
Kai Ni
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,38 +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 │ │ │ │ -OptionalJacobian.h File Reference │ │ │ │ -Special class for optional Jacobian arguments. _M_o_r_e_._._. │ │ │ │ +DSFVector.h File Reference │ │ │ │ +A faster implementation for DSF, which uses vector rather than btree. _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_:_:_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_:_:_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_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Special class for optional Jacobian arguments. │ │ │ │ - Author │ │ │ │ - Frank Dellaert │ │ │ │ - Natesh Srinivasan │ │ │ │ +A faster implementation for DSF, which uses vector rather than btree. │ │ │ │ Date │ │ │ │ - Nov 28, 2014 │ │ │ │ + Jun 25, 2010 │ │ │ │ + Author │ │ │ │ + Kai Ni │ │ │ │ * _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 │ │ │ │ + * _D_S_F_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/a00101_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/OptionalJacobian.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/DSFVector.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,292 +98,96 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
OptionalJacobian.h
│ │ │ +
DSFVector.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#include <gtsam/config.h> // Configuration from CMake
│ │ │ -
22#include <Eigen/Dense>
│ │ │ -
23#include <stdexcept>
│ │ │ -
24#include <string>
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/dllexport.h>
│ │ │ + │ │ │ +
23
│ │ │ +
24#include <boost/shared_ptr.hpp>
│ │ │
25
│ │ │ -
26#ifndef OPTIONALJACOBIAN_NOBOOST
│ │ │ -
27#include <boost/optional.hpp>
│ │ │ -
28#endif
│ │ │ +
26#include <vector>
│ │ │ +
27#include <set>
│ │ │ +
28#include <map>
│ │ │
29
│ │ │
30namespace gtsam {
│ │ │
31
│ │ │ -
40template<int Rows, int Cols>
│ │ │ -
│ │ │ - │ │ │ +
│ │ │ +
38class GTSAM_EXPORT DSFBase {
│ │ │ +
39
│ │ │ +
40public:
│ │ │ +
41 typedef std::vector<size_t> V;
│ │ │
42
│ │ │ -
43public:
│ │ │ -
44
│ │ │ -
47 typedef Eigen::Matrix<double, Rows, Cols> Jacobian;
│ │ │ -
48
│ │ │ -
49private:
│ │ │ -
50
│ │ │ -
51 Eigen::Map<Jacobian> map_;
│ │ │ +
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
│ │ │ -
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:
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
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 }
│ │ │ -
│ │ │ +
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 OptionalJacobian(Eigen::MatrixXd& dynamic) :
│ │ │ -
89 map_(nullptr) {
│ │ │ -
90 dynamic.resize(Rows, Cols); // no malloc if correct size
│ │ │ -
91 usurp(dynamic.data());
│ │ │ -
92 }
│ │ │ +
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
│ │ │ -
│ │ │ -
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
│ │ │ +
94}
│ │ │ +
Included from all GTSAM files.
│ │ │
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
│ │ │ -
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
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,321 +1,97 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -OptionalJacobian.h │ │ │ │ +DSFVector.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#include // Configuration from CMake │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ +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> │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ 25 │ │ │ │ -26#ifndef OPTIONALJACOBIAN_NOBOOST │ │ │ │ -27#include │ │ │ │ -28#endif │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ 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 { │ │ │ │ +_3_8class GTSAM_EXPORT _D_S_F_B_a_s_e { │ │ │ │ +39 │ │ │ │ +40public: │ │ │ │ +_4_1 typedef std::vector _V; │ │ │ │ 42 │ │ │ │ -43public: │ │ │ │ -44 │ │ │ │ -_4_7 typedef Eigen::Matrix _J_a_c_o_b_i_a_n; │ │ │ │ -48 │ │ │ │ -49private: │ │ │ │ -50 │ │ │ │ -51 Eigen::Map map_; │ │ │ │ +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 │ │ │ │ -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: │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +88 std::map > sets() const; │ │ │ │ +89 │ │ │ │ +91 std::map > arrays() const; │ │ │ │ +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 │ │ │ │ +94} │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ + * _D_S_F_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/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/Manifold.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,94 +94,86 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ Functions
│ │ │ -
MatrixSerialization.h File Reference
│ │ │ +
Manifold.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Serialization for matrices. │ │ │ +

Base class and basic functions for Manifold 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::internal::HasManifoldPrereqs< Class >
 Requirements on type to pass it to Manifold template below. More...
 
struct  gtsam::internal::GetDimensionImpl< Class, N >
 Extra manifold traits for fixed-dimension types. More...
 
struct  gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >
 Extra manifold traits for variable-dimension types. More...
 
struct  gtsam::internal::ManifoldTraits< Class >
 A helper that implements the traits interface for GTSAM manifolds. 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...
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +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>;
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ 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 T >
 gtsam::BOOST_CONCEPT_REQUIRES (((IsTestable< T >)),(bool)) check_manifold_invariants(const T &a
 Check invariants for Manifold type.
 
│ │ │

Detailed Description

│ │ │ -

Serialization for matrices.

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

Function Documentation

│ │ │ - │ │ │ -

◆ save()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -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.

│ │ │ -

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

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

Base class and basic functions for Manifold types.

│ │ │ +
Author
Alex Cunningham
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Mike Bosse
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,60 @@ │ │ │ │ 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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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_._._. │ │ │ │ +  │ │ │ │ +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_._._. │ │ │ │ +  │ │ │ │ +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  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__TTYYPPEE(T)   using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ + IsManifold; │ │ │ │ +  │ │ │ │ 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_T_e_s_t_a_b_l_e< T >)),(bool)) │ │ │ │ + check_manifold_invariants(const T &a │ │ │ │ +  Check invariants for Manifold type. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Serialization for matrices. │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ 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 │ │ │ │ + Mike Bosse │ │ │ │ * _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 │ │ │ │ + * _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/a00104.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,11 @@ │ │ │ │ var a00104 = [ │ │ │ │ - ["save", "a00104.html#a068f1f8df2afd609744bc82386259e71", 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", "a00104.html#a64b5e2e3c812d2cdea5ee294100f825f", null], │ │ │ │ + ["BOOST_CONCEPT_REQUIRES", "a00104.html#ae03a6aedf0a82f67c2f3e987fb3aacba", 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/Manifold.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,91 +98,189 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
MatrixSerialization.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
│ │ │ -
19// \callgraph
│ │ │ -
20
│ │ │ -
21#pragma once
│ │ │ -
22
│ │ │ -
23#include <gtsam/base/Matrix.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 {
│ │ │ +
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
│ │ │ -
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}
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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:
│ │ │ +
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>;
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
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 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,82 +1,206 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -MatrixSerialization.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 │ │ │ │ -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> │ │ │ │ -24 │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace boost { │ │ │ │ -30namespace serialization { │ │ │ │ +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> │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ 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} │ │ │ │ +_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 │ │ │ │ -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 │ │ │ │ +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: │ │ │ │ +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; │ │ │ │ _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. │ │ │ │ +_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 │ │ │ │ +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_:_:_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_t_r_i_x_S_e_r_i_a_l_i_z_a_t_i_o_n_._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/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/make_shared.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,158 +95,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ +Typedefs | │ │ │ Functions
│ │ │ -
Matrix.cpp File Reference
│ │ │ +
make_shared.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

matrix class │ │ │ +

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

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ 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

│ │ │ -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.
 
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

│ │ │ -

matrix class

│ │ │ -
Author
Christian Potthast
│ │ │ +

make_shared trampoline function to ensure proper alignment

│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,179 +1,47 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_. │ │ │ │ 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 │ │ │ │ +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. │ │ │ │   │ │ │ │ - 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. │ │ │ │ +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 ********** │ │ │ │ -matrix class │ │ │ │ +make_shared trampoline function to ensure proper alignment │ │ │ │ Author │ │ │ │ - Christian Potthast │ │ │ │ + Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_t_r_i_x_._c_p_p │ │ │ │ + * _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/a00110.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,29 +1,5 @@ │ │ │ │ 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] │ │ │ │ + ["enable_if_t", "a00110.html#a47e06cd29f4e8a20a8a7842e4045845f", null], │ │ │ │ + ["make_shared", "a00110.html#abcb9ece2bd206193ac40f118f1815c0e", null], │ │ │ │ + ["make_shared", "a00110.html#a6f805b32c5544e5552d702d5e2b4e801", 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/OptionalJacobian.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,85 +95,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
Manifold.h File Reference
│ │ │ +Namespaces
│ │ │ +
OptionalJacobian.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Special class for optional Jacobian arguments. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  gtsam::manifold_tag
 tag to assert a type is a manifold More...
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...
 
struct  gtsam::internal::HasManifoldPrereqs< Class >
 Requirements on type to pass it to Manifold template below. More...
class  gtsam::OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >
 
struct  gtsam::internal::GetDimensionImpl< Class, N >
 Extra manifold traits for fixed-dimension types. More...
struct  gtsam::MakeJacobian< T, A >
 : meta-function to generate Jacobian More...
 
struct  gtsam::internal::GetDimensionImpl< Class, Eigen::Dynamic >
 Extra manifold traits for variable-dimension types. More...
 
struct  gtsam::internal::ManifoldTraits< Class >
 A helper that implements the traits interface for GTSAM manifolds. 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...
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -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>;
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

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

Detailed Description

│ │ │ -

Base class and basic functions for Manifold types.

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

Special class for optional Jacobian arguments.

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │ -Mike Bosse
│ │ │ +Natesh Srinivasan
│ │ │ +
Date
Nov 28, 2014
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,60 +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 | _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_._._. │ │ │ │ +_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 │ │ │ │ -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_:_:_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_:_:_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_._._. │ │ │ │ -  │ │ │ │ -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_:_:_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_._._. │ │ │ │   │ │ │ │ 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  GGTTSSAAMM__CCOONNCCEEPPTT__MMAANNIIFFOOLLDD__TTYYPPEE(T)   using _gtsam_IsManifold_##T = gtsam:: │ │ │ │ - IsManifold; │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -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 ********** │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ Author │ │ │ │ - Alex Cunningham │ │ │ │ Frank Dellaert │ │ │ │ - Mike Bosse │ │ │ │ + Natesh Srinivasan │ │ │ │ + Date │ │ │ │ + Nov 28, 2014 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _M_a_n_i_f_o_l_d_._h │ │ │ │ + * _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/a00113.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,11 +1,6 @@ │ │ │ │ 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::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] │ │ │ │ ]; │ │ ├── ./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/OptionalJacobian.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,189 +98,292 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Manifold.h
│ │ │ +
OptionalJacobian.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>
│ │ │ - │ │ │ +
21#include <gtsam/config.h> // Configuration from CMake
│ │ │ +
22#include <Eigen/Dense>
│ │ │ +
23#include <stdexcept>
│ │ │ +
24#include <string>
│ │ │
25
│ │ │ -
26#include <boost/concept_check.hpp>
│ │ │ -
27#include <boost/concept/requires.hpp>
│ │ │ -
28#include <boost/type_traits/is_base_of.hpp>
│ │ │ +
26#ifndef OPTIONALJACOBIAN_NOBOOST
│ │ │ +
27#include <boost/optional.hpp>
│ │ │ +
28#endif
│ │ │
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;
│ │ │ - │ │ │ +
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
│ │ │ -
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 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};
│ │ │ +
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
│ │ │ -
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:
│ │ │ -
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>;
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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 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
│ │ │ +
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,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Manifold.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 │ │ │ │ @@ -15,192 +15,307 @@ │ │ │ │ 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> │ │ │ │ +21#include // Configuration from CMake │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ 25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ +26#ifndef OPTIONALJACOBIAN_NOBOOST │ │ │ │ +27#include │ │ │ │ +28#endif │ │ │ │ 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; │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -_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); │ │ │ │ +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}; │ │ │ │ +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: │ │ │ │ -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; │ │ │ │ -_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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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 │ │ │ │ - * _M_a_n_i_f_o_l_d_._h │ │ │ │ + * _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/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/SymmetricBlockMatrix.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,138 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
Lie.h File Reference
│ │ │ +Namespaces
│ │ │ +
SymmetricBlockMatrix.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Access to matrices via blocks of pre-defined sizes. │ │ │ 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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

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

Access to matrices via blocks of pre-defined sizes.

│ │ │ +

Used in GaussianFactor and GaussianConditional.

Author
Richard Roberts
│ │ │ +
Date
Sep 18, 2010
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,101 +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 | _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_._._. │ │ │ │ -_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_._._. │ │ │ │ -  │ │ │ │ +_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. │ │ │ │   │ │ │ │ -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. │ │ │ │ +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 │ │ │ │ - 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 │ │ │ │ + Sep 18, 2010 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _L_i_e_._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/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/testLie.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,220 +98,111 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Group.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
│ │ │ -
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;
│ │ │ +
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 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 }
│ │ │ +
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 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.
│ │ │ +
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); }
│ │ │ +
Base class and basic functions for Lie types.
│ │ │ +
Some functions to compute numerical derivatives.
│ │ │
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
│ │ │ +
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,237 +1,119 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -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_. │ │ │ │ +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 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -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; │ │ │ │ +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 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 } │ │ │ │ +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 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. │ │ │ │ +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); } │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ +_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. │ │ │ │ _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_:_:_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 │ │ │ │ - * _G_r_o_u_p_._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/a00122_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/GenericValue.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/serialization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,281 +98,319 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
GenericValue.h
│ │ │ +
serialization.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 GenericValue.h
│ │ │ -
14 * @brief Wraps any type T so it can play as a Value
│ │ │ -
15 * @date October, 2014
│ │ │ -
16 * @author Michael Bosse, Abel Gawel, Renaud Dube
│ │ │ -
17 * based on DerivedValue.h by Duy Nguyen Ta
│ │ │ -
18 */
│ │ │ -
19
│ │ │
20#pragma once
│ │ │
21
│ │ │ -
22#include <gtsam/base/Manifold.h>
│ │ │ -
23#include <gtsam/base/types.h>
│ │ │ -
24#include <gtsam/base/Value.h>
│ │ │ -
25
│ │ │ -
26#include <boost/make_shared.hpp>
│ │ │ -
27#include <boost/pool/pool_alloc.hpp>
│ │ │ -
28
│ │ │ -
29#include <cmath>
│ │ │ -
30#include <iostream>
│ │ │ -
31#include <typeinfo> // operator typeid
│ │ │ -
32
│ │ │ -
33#ifdef _WIN32
│ │ │ -
34#define GENERICVALUE_VISIBILITY
│ │ │ -
35#else
│ │ │ -
36// This will trigger a LNKxxxx on MSVC, so disable for MSVC build
│ │ │ -
37// Please refer to https://github.com/borglab/gtsam/blob/develop/Using-GTSAM-EXPORT.md
│ │ │ -
38#define GENERICVALUE_VISIBILITY GTSAM_EXPORT
│ │ │ -
39#endif
│ │ │ -
40
│ │ │ -
41namespace gtsam {
│ │ │ -
42
│ │ │ -
46template<class T>
│ │ │ -
│ │ │ -
47class GenericValue: public Value {
│ │ │ -
48
│ │ │ -
49public:
│ │ │ -
50
│ │ │ -
51 typedef T type;
│ │ │ -
52
│ │ │ -
53protected:
│ │ │ -
54
│ │ │ - │ │ │ -
56
│ │ │ -
57public:
│ │ │ -
58 // Only needed for serialization.
│ │ │ -
59 GenericValue(){}
│ │ │ -
60
│ │ │ -
│ │ │ -
62 GenericValue(const T& value) :
│ │ │ -
63 value_(value) {
│ │ │ -
64 }
│ │ │ -
│ │ │ -
65
│ │ │ -
│ │ │ -
67 const T& value() const {
│ │ │ -
68 return value_;
│ │ │ -
69 }
│ │ │ -
│ │ │ -
70
│ │ │ -
│ │ │ -
72 T& value() {
│ │ │ -
73 return value_;
│ │ │ -
74 }
│ │ │ +
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
│ │ │ -
│ │ │ -
77 ~GenericValue() override {
│ │ │ -
78 }
│ │ │ -
│ │ │ -
79
│ │ │ -
│ │ │ -
81 bool equals_(const Value& p, double tol = 1e-9) const override {
│ │ │ -
82 // Cast the base class Value pointer to a templated generic class pointer
│ │ │ -
83 const GenericValue& genericValue2 = static_cast<const GenericValue&>(p);
│ │ │ -
84 // Return the result of using the equals traits for the derived class
│ │ │ -
85 return traits<T>::Equals(this->value_, genericValue2.value_, tol);
│ │ │ -
86 }
│ │ │ -
│ │ │ -
87
│ │ │ -
│ │ │ -
89 bool equals(const GenericValue &other, double tol = 1e-9) const {
│ │ │ -
90 return traits<T>::Equals(this->value(), other.value(), tol);
│ │ │ -
91 }
│ │ │ -
│ │ │ -
92
│ │ │ -
│ │ │ -
94 void print(const std::string& str) const override {
│ │ │ -
95 std::cout << "(" << demangle(typeid(T).name()) << ")\n";
│ │ │ - │ │ │ -
97 }
│ │ │ -
│ │ │ -
98
│ │ │ -
│ │ │ -
102 Value* clone_() const override {
│ │ │ -
103 GenericValue* ptr = new GenericValue(*this); // calls copy constructor to fill in
│ │ │ -
104 return ptr;
│ │ │ -
105 }
│ │ │ -
│ │ │ -
106
│ │ │ -
│ │ │ -
110 void deallocate_() const override {
│ │ │ -
111 delete this;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
│ │ │ -
117 boost::shared_ptr<Value> clone() const override {
│ │ │ -
118 return boost::allocate_shared<GenericValue>(Eigen::aligned_allocator<GenericValue>(), *this);
│ │ │ -
119 }
│ │ │ -
│ │ │ -
120
│ │ │ -
│ │ │ -
122 Value* retract_(const Vector& delta) const override {
│ │ │ -
123 // Call retract on the derived class using the retract trait function
│ │ │ -
124 const T retractResult = traits<T>::Retract(GenericValue<T>::value(), delta);
│ │ │ -
125
│ │ │ -
126 Value* resultAsValue = new GenericValue(retractResult);
│ │ │ -
127
│ │ │ -
128 // Return the pointer to the Value base class
│ │ │ -
129 return resultAsValue;
│ │ │ -
130 }
│ │ │ -
│ │ │ -
131
│ │ │ -
│ │ │ -
133 Vector localCoordinates_(const Value& value2) const override {
│ │ │ -
134 // Cast the base class Value pointer to a templated generic class pointer
│ │ │ -
135 const GenericValue<T>& genericValue2 =
│ │ │ -
136 static_cast<const GenericValue<T>&>(value2);
│ │ │ -
137
│ │ │ -
138 // Return the result of calling localCoordinates trait on the derived class
│ │ │ -
139 return traits<T>::Local(GenericValue<T>::value(), genericValue2.value());
│ │ │ -
140 }
│ │ │ -
│ │ │ -
141
│ │ │ -
│ │ │ -
143 GenericValue retract(const Vector& delta) const {
│ │ │ - │ │ │ -
145 }
│ │ │ -
│ │ │ -
146
│ │ │ -
│ │ │ -
148 Vector localCoordinates(const GenericValue& value2) const {
│ │ │ -
149 return localCoordinates_(value2);
│ │ │ -
150 }
│ │ │ -
│ │ │ -
151
│ │ │ -
│ │ │ -
153 size_t dim() const override {
│ │ │ - │ │ │ -
155 }
│ │ │ -
│ │ │ -
156
│ │ │ -
│ │ │ -
158 Value& operator=(const Value& rhs) override {
│ │ │ -
159 // Cast the base class Value pointer to a derived class pointer
│ │ │ -
160 const GenericValue& derivedRhs = static_cast<const GenericValue&>(rhs);
│ │ │ -
161
│ │ │ -
162 // Do the assignment and return the result
│ │ │ -
163 *this = GenericValue(derivedRhs); // calls copy constructor
│ │ │ -
164 return *this;
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
167 protected:
│ │ │ -
168
│ │ │ -
│ │ │ - │ │ │ -
172 Value::operator=(static_cast<Value const&>(rhs));
│ │ │ -
173 value_ = rhs.value_;
│ │ │ -
174 return *this;
│ │ │ -
175 }
│ │ │ -
│ │ │ -
176
│ │ │ -
177 private:
│ │ │ -
178
│ │ │ - │ │ │ -
181 template<class ARCHIVE>
│ │ │ -
182 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
183 ar & boost::serialization::make_nvp("GenericValue",
│ │ │ -
184 boost::serialization::base_object<Value>(*this));
│ │ │ -
185 ar & boost::serialization::make_nvp("value", value_);
│ │ │ -
186 }
│ │ │ -
187
│ │ │ -
188
│ │ │ -
189 // Alignment, see https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
│ │ │ -
190 enum { NeedsToAlign = (sizeof(T) % 16) == 0 };
│ │ │ -
191public:
│ │ │ - │ │ │ -
193};
│ │ │ +
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
│ │ │ +
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}
│ │ │
│ │ │ -
194
│ │ │ -
196#define GTSAM_VALUE_EXPORT(Type) BOOST_CLASS_EXPORT(gtsam::GenericValue<Type>)
│ │ │
197
│ │ │ -
198// traits
│ │ │ -
199template <typename ValueType>
│ │ │ -
│ │ │ -
200struct traits<GenericValue<ValueType> >
│ │ │ -
201 : public Testable<GenericValue<ValueType> > {};
│ │ │ -
│ │ │ -
202
│ │ │ -
203// define Value::cast here since now GenericValue has been declared
│ │ │ -
204template<typename ValueType>
│ │ │ -
│ │ │ -
205const ValueType& Value::cast() const {
│ │ │ -
206 return dynamic_cast<const GenericValue<ValueType>&>(*this).value();
│ │ │ -
207}
│ │ │ +
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}
│ │ │
│ │ │ -
208
│ │ │ -
211template<class T>
│ │ │ +
209
│ │ │ +
211template <class T>
│ │ │
│ │ │ - │ │ │ -
213 return GenericValue<T>(v);
│ │ │ -
214}
│ │ │ -
│ │ │ -
215
│ │ │ -
216
│ │ │ -
217} /* namespace gtsam */
│ │ │ -
Typedefs for easier changing of types.
│ │ │ -
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
This marks a GTSAM object to require alignment.
Definition types.h:317
│ │ │ -
The base class for any variable that can be optimized or used in a factor.
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ +
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
│ │ │ -
std::string demangle(const char *name)
Pretty print Value type name.
Definition types.cpp:37
│ │ │ -
GenericValue< T > genericValue(const T &v)
Functional constructor of GenericValue<T> so T can be automatically deduced.
Definition GenericValue.h:212
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
Wraps any type T so it can play as a Value.
Definition GenericValue.h:47
│ │ │ -
Value * clone_() const override
Create a duplicate object returned as a pointer to the generic Value interface.
Definition GenericValue.h:102
│ │ │ -
T & value()
Return the value.
Definition GenericValue.h:72
│ │ │ -
Value * retract_(const Vector &delta) const override
Generic Value interface version of retract.
Definition GenericValue.h:122
│ │ │ -
Value & operator=(const Value &rhs) override
Assignment operator.
Definition GenericValue.h:158
│ │ │ -
void print(const std::string &str) const override
Virtual print function, uses traits.
Definition GenericValue.h:94
│ │ │ -
bool equals(const GenericValue &other, double tol=1e-9) const
non virtual equals function, uses traits
Definition GenericValue.h:89
│ │ │ -
size_t dim() const override
Return run-time dimensionality.
Definition GenericValue.h:153
│ │ │ -
GenericValue(const T &value)
Construct from value.
Definition GenericValue.h:62
│ │ │ -
void deallocate_() const override
Destroy and deallocate this object, only if it was originally allocated using clone_().
Definition GenericValue.h:110
│ │ │ -
T value_
The wrapped value.
Definition GenericValue.h:55
│ │ │ -
GenericValue< T > & operator=(const GenericValue< T > &rhs)
Assignment operator, protected because only the Value or DERIVED assignment operators should be used.
Definition GenericValue.h:171
│ │ │ -
Vector localCoordinates(const GenericValue &value2) const
Non-virtual version of localCoordinates.
Definition GenericValue.h:148
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition GenericValue.h:180
│ │ │ -
bool equals_(const Value &p, double tol=1e-9) const override
equals implementing generic Value interface
Definition GenericValue.h:81
│ │ │ -
const T & value() const
Return a constant value.
Definition GenericValue.h:67
│ │ │ -
~GenericValue() override
Destructor.
Definition GenericValue.h:77
│ │ │ -
GenericValue retract(const Vector &delta) const
Non-virtual version of retract.
Definition GenericValue.h:143
│ │ │ -
Vector localCoordinates_(const Value &value2) const override
Generic Value interface version of localCoordinates.
Definition GenericValue.h:133
│ │ │ -
boost::shared_ptr< Value > clone() const override
Clone this value (normal clone on the heap, delete with 'delete' operator)
Definition GenericValue.h:117
│ │ │ -
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
│ │ │ -
const ValueType & cast() const
Cast to known ValueType.
Definition GenericValue.h:205
│ │ │ -
virtual Value & operator=(const Value &)
Assignment operator.
Definition Value.h:79
│ │ │ +
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,324 +1,349 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -GenericValue.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 │ │ │ │ -12/* │ │ │ │ -13 * @file GenericValue.h │ │ │ │ -14 * @brief Wraps any type T so it can play as a Value │ │ │ │ -15 * @date October, 2014 │ │ │ │ -16 * @author Michael Bosse, Abel Gawel, Renaud Dube │ │ │ │ -17 * based on DerivedValue.h by Duy Nguyen Ta │ │ │ │ -18 */ │ │ │ │ -19 │ │ │ │ 20#pragma once │ │ │ │ 21 │ │ │ │ -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_y_p_e_s_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_b_a_s_e_/_V_a_l_u_e_._h> │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include // operator typeid │ │ │ │ -32 │ │ │ │ -33#ifdef _WIN32 │ │ │ │ -34#define GENERICVALUE_VISIBILITY │ │ │ │ -35#else │ │ │ │ -36// This will trigger a LNKxxxx on MSVC, so disable for MSVC build │ │ │ │ -37// Please refer to https://github.com/borglab/gtsam/blob/develop/Using-GTSAM- │ │ │ │ -EXPORT.md │ │ │ │ -38#define GENERICVALUE_VISIBILITY GTSAM_EXPORT │ │ │ │ -39#endif │ │ │ │ -40 │ │ │ │ -41namespace _g_t_s_a_m { │ │ │ │ -42 │ │ │ │ -46template │ │ │ │ -_4_7class _G_e_n_e_r_i_c_V_a_l_u_e: public _V_a_l_u_e { │ │ │ │ -48 │ │ │ │ -49public: │ │ │ │ -50 │ │ │ │ -51 typedef T type; │ │ │ │ -52 │ │ │ │ -53protected: │ │ │ │ -54 │ │ │ │ -_5_5 T _v_a_l_u_e__; │ │ │ │ -56 │ │ │ │ -57public: │ │ │ │ -58 // Only needed for serialization. │ │ │ │ -59 _G_e_n_e_r_i_c_V_a_l_u_e(){} │ │ │ │ -60 │ │ │ │ -_6_2 _G_e_n_e_r_i_c_V_a_l_u_e(const T& _v_a_l_u_e) : │ │ │ │ -63 _v_a_l_u_e__(_v_a_l_u_e) { │ │ │ │ -64 } │ │ │ │ -65 │ │ │ │ -_6_7 const T& _v_a_l_u_e() const { │ │ │ │ -68 return _v_a_l_u_e__; │ │ │ │ -69 } │ │ │ │ -70 │ │ │ │ -_7_2 T& _v_a_l_u_e() { │ │ │ │ -73 return _v_a_l_u_e__; │ │ │ │ -74 } │ │ │ │ +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 │ │ │ │ -_7_7 _~_G_e_n_e_r_i_c_V_a_l_u_e() override { │ │ │ │ -78 } │ │ │ │ -79 │ │ │ │ -_8_1 bool _e_q_u_a_l_s__(const _V_a_l_u_e& p, double tol = 1e-9) const override { │ │ │ │ -82 // Cast the base class Value pointer to a templated generic class pointer │ │ │ │ -83 const _G_e_n_e_r_i_c_V_a_l_u_e& genericValue2 = static_cast(p); │ │ │ │ -84 // Return the result of using the equals traits for the derived class │ │ │ │ -85 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(this->value_, genericValue2._v_a_l_u_e__, tol); │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -_8_9 bool _e_q_u_a_l_s(const _G_e_n_e_r_i_c_V_a_l_u_e &other, double tol = 1e-9) const { │ │ │ │ -90 return _t_r_a_i_t_s_<_T_>_:_:_E_q_u_a_l_s(this->_v_a_l_u_e(), other._v_a_l_u_e(), tol); │ │ │ │ -91 } │ │ │ │ -92 │ │ │ │ -_9_4 void _p_r_i_n_t(const std::string& str) const override { │ │ │ │ -95 std::cout << "(" << _d_e_m_a_n_g_l_e(typeid(T).name()) << ")\n"; │ │ │ │ -96 _t_r_a_i_t_s_<_T_>_:_:_P_r_i_n_t(_v_a_l_u_e__, str); │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -_1_0_2 _V_a_l_u_e* _c_l_o_n_e__() const override { │ │ │ │ -103 _G_e_n_e_r_i_c_V_a_l_u_e* ptr = new _G_e_n_e_r_i_c_V_a_l_u_e(*this); // calls copy constructor to │ │ │ │ -fill in │ │ │ │ -104 return ptr; │ │ │ │ -105 } │ │ │ │ -106 │ │ │ │ -_1_1_0 void _d_e_a_l_l_o_c_a_t_e__() const override { │ │ │ │ -111 delete this; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_1_7 boost::shared_ptr _c_l_o_n_e() const override { │ │ │ │ -118 return boost::allocate_shared(Eigen:: │ │ │ │ -aligned_allocator(), *this); │ │ │ │ -119 } │ │ │ │ -120 │ │ │ │ -_1_2_2 _V_a_l_u_e* _r_e_t_r_a_c_t__(const Vector& delta) const override { │ │ │ │ -123 // Call retract on the derived class using the retract trait function │ │ │ │ -124 const T retractResult = _t_r_a_i_t_s_<_T_>_:_:_R_e_t_r_a_c_t(_G_e_n_e_r_i_c_V_a_l_u_e_<_T_>_:_:_v_a_l_u_e(), │ │ │ │ -delta); │ │ │ │ -125 │ │ │ │ -126 _V_a_l_u_e* resultAsValue = new _G_e_n_e_r_i_c_V_a_l_u_e(retractResult); │ │ │ │ -127 │ │ │ │ -128 // Return the pointer to the Value base class │ │ │ │ -129 return resultAsValue; │ │ │ │ -130 } │ │ │ │ -131 │ │ │ │ -_1_3_3 Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__(const _V_a_l_u_e& value2) const override { │ │ │ │ -134 // Cast the base class Value pointer to a templated generic class pointer │ │ │ │ -135 const _G_e_n_e_r_i_c_V_a_l_u_e_<_T_>& genericValue2 = │ │ │ │ -136 static_cast&>(value2); │ │ │ │ -137 │ │ │ │ -138 // Return the result of calling localCoordinates trait on the derived class │ │ │ │ -139 return _t_r_a_i_t_s_<_T_>_:_:_L_o_c_a_l(_G_e_n_e_r_i_c_V_a_l_u_e_<_T_>_:_:_v_a_l_u_e(), genericValue2._v_a_l_u_e()); │ │ │ │ -140 } │ │ │ │ -141 │ │ │ │ -_1_4_3 _G_e_n_e_r_i_c_V_a_l_u_e _r_e_t_r_a_c_t(const Vector& delta) const { │ │ │ │ -144 return _G_e_n_e_r_i_c_V_a_l_u_e(_t_r_a_i_t_s_<_T_>_:_:_R_e_t_r_a_c_t(_G_e_n_e_r_i_c_V_a_l_u_e_<_T_>_:_:_v_a_l_u_e(), delta)); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -_1_4_8 Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _G_e_n_e_r_i_c_V_a_l_u_e& value2) const { │ │ │ │ -149 return _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__(value2); │ │ │ │ -150 } │ │ │ │ -151 │ │ │ │ -_1_5_3 size_t _d_i_m() const override { │ │ │ │ -154 return _t_r_a_i_t_s_<_T_>_:_:_G_e_t_D_i_m_e_n_s_i_o_n(_v_a_l_u_e__); │ │ │ │ -155 } │ │ │ │ -156 │ │ │ │ -_1_5_8 _V_a_l_u_e& _o_p_e_r_a_t_o_r_=(const _V_a_l_u_e& rhs) override { │ │ │ │ -159 // Cast the base class Value pointer to a derived class pointer │ │ │ │ -160 const _G_e_n_e_r_i_c_V_a_l_u_e& derivedRhs = static_cast(rhs); │ │ │ │ -161 │ │ │ │ -162 // Do the assignment and return the result │ │ │ │ -163 *this = _G_e_n_e_r_i_c_V_a_l_u_e(derivedRhs); // calls copy constructor │ │ │ │ -164 return *this; │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -167 protected: │ │ │ │ -168 │ │ │ │ -_1_7_1 _G_e_n_e_r_i_c_V_a_l_u_e_<_T_>& _o_p_e_r_a_t_o_r_=(const _G_e_n_e_r_i_c_V_a_l_u_e_<_T_>& rhs) { │ │ │ │ -172 _V_a_l_u_e_:_:_o_p_e_r_a_t_o_r_=(static_cast<_V_a_l_u_e const&>(rhs)); │ │ │ │ -173 _v_a_l_u_e__ = rhs._v_a_l_u_e__; │ │ │ │ -174 return *this; │ │ │ │ -175 } │ │ │ │ -176 │ │ │ │ -177 private: │ │ │ │ -178 │ │ │ │ -_1_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; │ │ │ │ -181 template │ │ │ │ -182 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -183 ar & boost::serialization::make_nvp("GenericValue", │ │ │ │ -184 boost::serialization::base_object(*this)); │ │ │ │ -185 ar & boost::serialization::make_nvp("value", _v_a_l_u_e__); │ │ │ │ -186 } │ │ │ │ -187 │ │ │ │ -188 │ │ │ │ -189 // Alignment, see https://eigen.tuxfamily.org/dox/ │ │ │ │ -group__TopicStructHavingEigenMembers.html │ │ │ │ -190 enum { NeedsToAlign = (sizeof(T) % 16) == 0 }; │ │ │ │ -191public: │ │ │ │ -192 _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) │ │ │ │ -193}; │ │ │ │ -194 │ │ │ │ -196#define GTSAM_VALUE_EXPORT(Type) BOOST_CLASS_EXPORT(gtsam:: │ │ │ │ -GenericValue) │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -198// traits │ │ │ │ -199template │ │ │ │ -_2_0_0struct _t_r_a_i_t_s<_G_e_n_e_r_i_c_V_a_l_u_e > │ │ │ │ -201 : public _T_e_s_t_a_b_l_e > {}; │ │ │ │ -202 │ │ │ │ -203// define Value::cast here since now GenericValue has been declared │ │ │ │ -204template │ │ │ │ -_2_0_5const ValueType& _V_a_l_u_e_:_:_c_a_s_t() const { │ │ │ │ -206 return dynamic_cast&>(*this)._v_a_l_u_e(); │ │ │ │ -207} │ │ │ │ -208 │ │ │ │ -211template │ │ │ │ -_2_1_2_G_e_n_e_r_i_c_V_a_l_u_e_<_T_> _g_e_n_e_r_i_c_V_a_l_u_e(const T& v) { │ │ │ │ -213 return _G_e_n_e_r_i_c_V_a_l_u_e_<_T_>(v); │ │ │ │ -214} │ │ │ │ -215 │ │ │ │ -216 │ │ │ │ -217} /* namespace gtsam */ │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ -_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 │ │ │ │ -_V_a_l_u_e_._h │ │ │ │ -The base class for any variable that can be optimized or used in a factor. │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ +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_:_:_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_:_:_g_e_n_e_r_i_c_V_a_l_u_e │ │ │ │ -GenericValue< T > genericValue(const T &v) │ │ │ │ -Functional constructor of GenericValue so T can be automatically deduced. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:212 │ │ │ │ -_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_e_n_e_r_i_c_V_a_l_u_e │ │ │ │ -Wraps any type T so it can play as a Value. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:47 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_c_l_o_n_e__ │ │ │ │ -Value * clone_() const override │ │ │ │ -Create a duplicate object returned as a pointer to the generic Value interface. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:102 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ -T & value() │ │ │ │ -Return the value. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:72 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_r_e_t_r_a_c_t__ │ │ │ │ -Value * retract_(const Vector &delta) const override │ │ │ │ -Generic Value interface version of retract. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:122 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -Value & operator=(const Value &rhs) override │ │ │ │ -Assignment operator. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:158 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &str) const override │ │ │ │ -Virtual print function, uses traits. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:94 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const GenericValue &other, double tol=1e-9) const │ │ │ │ -non virtual equals function, uses traits │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:89 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_d_i_m │ │ │ │ -size_t dim() const override │ │ │ │ -Return run-time dimensionality. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:153 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_G_e_n_e_r_i_c_V_a_l_u_e │ │ │ │ -GenericValue(const T &value) │ │ │ │ -Construct from value. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:62 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_d_e_a_l_l_o_c_a_t_e__ │ │ │ │ -void deallocate_() const override │ │ │ │ -Destroy and deallocate this object, only if it was originally allocated using │ │ │ │ -clone_(). │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:110 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_v_a_l_u_e__ │ │ │ │ -T value_ │ │ │ │ -The wrapped value. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:55 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -GenericValue< T > & operator=(const GenericValue< T > &rhs) │ │ │ │ -Assignment operator, protected because only the Value or DERIVED assignment │ │ │ │ -operators should be used. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:171 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector localCoordinates(const GenericValue &value2) const │ │ │ │ -Non-virtual version of localCoordinates. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:148 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:180 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_e_q_u_a_l_s__ │ │ │ │ -bool equals_(const Value &p, double tol=1e-9) const override │ │ │ │ -equals implementing generic Value interface │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:81 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ -const T & value() const │ │ │ │ -Return a constant value. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:67 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_~_G_e_n_e_r_i_c_V_a_l_u_e │ │ │ │ -~GenericValue() override │ │ │ │ -Destructor. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:77 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_r_e_t_r_a_c_t │ │ │ │ -GenericValue retract(const Vector &delta) const │ │ │ │ -Non-virtual version of retract. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:143 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s__ │ │ │ │ -Vector localCoordinates_(const Value &value2) const override │ │ │ │ -Generic Value interface version of localCoordinates. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:133 │ │ │ │ -_g_t_s_a_m_:_:_G_e_n_e_r_i_c_V_a_l_u_e_:_:_c_l_o_n_e │ │ │ │ -boost::shared_ptr< Value > clone() const override │ │ │ │ -Clone this value (normal clone on the heap, delete with 'delete' operator) │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:117 │ │ │ │ -_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_:_:_c_a_s_t │ │ │ │ -const ValueType & cast() const │ │ │ │ -Cast to known ValueType. │ │ │ │ -DDeeffiinniittiioonn GenericValue.h:205 │ │ │ │ -_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_:_:_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 │ │ │ │ - * GGeenneerriiccVVaalluuee..hh │ │ │ │ + * _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/a00125.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastVector.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/MatrixSerialization.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,94 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
FastVector.h File Reference
│ │ │ +Functions
│ │ │ +
MatrixSerialization.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Serialization for matrices. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Namespaces

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

│ │ │ -Typedefs

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.
 

│ │ │ +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)
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Richard Roberts
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
Date
Feb 9, 2011
│ │ │ -
│ │ │ +

Serialization for matrices.

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

Function Documentation

│ │ │ + │ │ │ +

◆ save()

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +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.

│ │ │ +

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

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,59 @@ │ │ │ │ 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 │ │ │ │ -FastVector.h File Reference │ │ │ │ -A thin wrapper around std::vector that uses a custom allocator. _M_o_r_e_._._. │ │ │ │ +_F_u_n_c_t_i_o_n_s │ │ │ │ +MatrixSerialization.h File Reference │ │ │ │ +Serialization for matrices. _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 │ │ │ │ +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. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -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. │ │ │ │ +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) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +Serialization for matrices. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ - Feb 9, 2011 │ │ │ │ + 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 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ + * _M_a_t_r_i_x_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/a00125.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00125 = [ │ │ │ │ - ["FastVector", "a00125.html#gafeaa7d82369f3ff952157586240273c8", null] │ │ │ │ + ["save", "a00125.html#a068f1f8df2afd609744bc82386259e71", null] │ │ │ │ ]; │ │ ├── ./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/MatrixSerialization.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,47 +98,91 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastVector.h
│ │ │ +
MatrixSerialization.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
│ │ │ - │ │ │ -
23#include <vector>
│ │ │ +
19// \callgraph
│ │ │ +
20
│ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ +
23#include <gtsam/base/Matrix.h>
│ │ │
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
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,46 +1,82 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastVector.h │ │ │ │ +MatrixSerialization.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_/_F_a_s_t_D_e_f_a_u_l_t_A_l_l_o_c_a_t_o_r_._h> │ │ │ │ -23#include │ │ │ │ +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> │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ + * _M_a_t_r_i_x_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/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/lieProxies.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,64 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
FastSet.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
lieProxies.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Provides convenient mappings of common member functions for testing. │ │ │ 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.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +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)
 
│ │ │

Detailed Description

│ │ │ -

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

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

Provides convenient mappings of common member functions for testing.

│ │ │ +
Author
Alex Cunningham
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -FastSet.h File Reference │ │ │ │ -A thin wrapper around std::set that uses boost's fast_pool_allocator. _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_:_:_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. │ │ │ │   │ │ │ │ +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) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ │ +Provides convenient mappings of common member functions for testing. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Date │ │ │ │ - Oct 17, 2010 │ │ │ │ + Alex Cunningham │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_S_e_t_._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/a00128_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/FastSet.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/lieProxies.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,162 +98,63 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastSet.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
│ │ │
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 <boost/version.hpp>
│ │ │ -
22#if BOOST_VERSION >= 107400
│ │ │ -
23#include <boost/serialization/library_version_type.hpp>
│ │ │ -
24#endif
│ │ │ -
25#include <boost/serialization/nvp.hpp>
│ │ │ -
26#include <boost/serialization/set.hpp>
│ │ │ - │ │ │ -
28#include <gtsam/base/Testable.h>
│ │ │ -
29
│ │ │ -
30#include <functional>
│ │ │ -
31#include <set>
│ │ │ -
32
│ │ │ -
33namespace boost {
│ │ │ -
34namespace serialization {
│ │ │ -
35class access;
│ │ │ -
36} /* namespace serialization */
│ │ │ -
37} /* namespace boost */
│ │ │ -
38
│ │ │ -
39namespace gtsam {
│ │ │ +
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); }
│ │ │ +
37
│ │ │ +
38 template<class T>
│ │ │ +
39 T compose(const T& t1, const T& t2) { return t1.compose(t2); }
│ │ │
40
│ │ │ -
48template<typename VALUE>
│ │ │ -
│ │ │ -
49class FastSet: public std::set<VALUE, std::less<VALUE>,
│ │ │ -
50 typename internal::FastDefaultAllocator<VALUE>::type> {
│ │ │ +
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 BOOST_CONCEPT_ASSERT ((IsTestable<VALUE> ));
│ │ │ -
53
│ │ │ -
54public:
│ │ │ +
52} // \namespace testing
│ │ │ +
53} // \namespace gtsam
│ │ │ +
54
│ │ │
55
│ │ │ -
56 typedef std::set<VALUE, std::less<VALUE>,
│ │ │ -
57 typename internal::FastDefaultAllocator<VALUE>::type> Base;
│ │ │ -
58
│ │ │ -
59 using Base::Base; // Inherit the set constructors
│ │ │ -
60
│ │ │ -
61 FastSet() = default;
│ │ │ -
62
│ │ │ -
64 template<typename INPUTCONTAINER>
│ │ │ -
│ │ │ -
65 explicit FastSet(const INPUTCONTAINER& container) :
│ │ │ -
66 Base(container.begin(), container.end()) {
│ │ │ -
67 }
│ │ │ -
│ │ │ -
68
│ │ │ -
│ │ │ - │ │ │ -
71 Base(x) {
│ │ │ -
72 }
│ │ │ -
│ │ │ -
73
│ │ │ -
│ │ │ -
75 FastSet(const Base& x) :
│ │ │ -
76 Base(x) {
│ │ │ -
77 }
│ │ │ -
│ │ │ -
78
│ │ │ -
79#ifdef GTSAM_ALLOCATOR_BOOSTPOOL
│ │ │ -
81 FastSet(const std::set<VALUE>& x) {
│ │ │ -
82 // This if statement works around a bug in boost pool allocator and/or
│ │ │ -
83 // STL vector where if the size is zero, the pool allocator will allocate
│ │ │ -
84 // huge amounts of memory.
│ │ │ -
85 if(x.size() > 0)
│ │ │ -
86 Base::insert(x.begin(), x.end());
│ │ │ -
87 }
│ │ │ -
88#endif
│ │ │ -
89
│ │ │ -
│ │ │ -
91 operator std::set<VALUE>() const {
│ │ │ -
92 return std::set<VALUE>(this->begin(), this->end());
│ │ │ -
93 }
│ │ │ -
│ │ │ -
94
│ │ │ -
│ │ │ -
96 bool exists(const VALUE& e) const {
│ │ │ -
97 return this->find(e) != this->end();
│ │ │ -
98 }
│ │ │ -
│ │ │ -
99
│ │ │ -
│ │ │ -
101 void print(const std::string& str = "") const {
│ │ │ -
102 for (typename Base::const_iterator it = this->begin(); it != this->end(); ++it)
│ │ │ -
103 traits<VALUE>::Print(*it, str);
│ │ │ -
104 }
│ │ │ -
│ │ │ -
105
│ │ │ -
│ │ │ -
107 bool equals(const FastSet<VALUE>& other, double tol = 1e-9) const {
│ │ │ -
108 typename Base::const_iterator it1 = this->begin(), it2 = other.begin();
│ │ │ -
109 while (it1 != this->end()) {
│ │ │ -
110 if (it2 == other.end() || !traits<VALUE>::Equals(*it2, *it2, tol))
│ │ │ -
111 return false;
│ │ │ -
112 ++it1;
│ │ │ -
113 ++it2;
│ │ │ -
114 }
│ │ │ -
115 return true;
│ │ │ -
116 }
│ │ │ -
│ │ │ -
117
│ │ │ -
│ │ │ -
119 void merge(const FastSet& other) {
│ │ │ -
120 Base::insert(other.begin(), other.end());
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122
│ │ │ -
123private:
│ │ │ - │ │ │ -
126 template<class ARCHIVE>
│ │ │ -
127 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
128 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
129 }
│ │ │ -
130};
│ │ │ -
│ │ │ -
131
│ │ │ -
132}
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
An easy way to control which allocator is used for Fast* collections.
│ │ │ +
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
│ │ │ -
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition concepts.h:30
│ │ │ -
FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the defa...
Definition FastSet.h:50
│ │ │ -
void merge(const FastSet &other)
insert another set: handy for MATLAB access
Definition FastSet.h:119
│ │ │ -
void print(const std::string &str="") const
Print to implement Testable: pretty basic.
Definition FastSet.h:101
│ │ │ -
FastSet(const INPUTCONTAINER &container)
Constructor from a iterable container, passes through to base class.
Definition FastSet.h:65
│ │ │ -
FastSet(const FastSet< VALUE > &x)
Copy constructor from another FastSet.
Definition FastSet.h:70
│ │ │ -
bool exists(const VALUE &e) const
Handy 'exists' function.
Definition FastSet.h:96
│ │ │ -
bool equals(const FastSet< VALUE > &other, double tol=1e-9) const
Check for equality within tolerance to implement Testable.
Definition FastSet.h:107
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition FastSet.h:125
│ │ │ -
FastSet(const Base &x)
Copy constructor from the base set class.
Definition FastSet.h:75
│ │ │ -
FastSet()=default
Default constructor.
│ │ │ -
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
Definition Testable.h:58
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,176 +1,67 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastSet.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 │ │ │ │ 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#if BOOST_VERSION >= 107400 │ │ │ │ -23#include │ │ │ │ -24#endif │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27#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> │ │ │ │ -28#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -29 │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32 │ │ │ │ -33namespace boost { │ │ │ │ -34namespace serialization { │ │ │ │ -35class access; │ │ │ │ -36} /* namespace serialization */ │ │ │ │ -37} /* namespace boost */ │ │ │ │ -38 │ │ │ │ -39namespace _g_t_s_a_m { │ │ │ │ +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); } │ │ │ │ +37 │ │ │ │ +38 template │ │ │ │ +39 T compose(const T& t1, const T& t2) { return t1.compose(t2); } │ │ │ │ 40 │ │ │ │ -48template │ │ │ │ -_4_9class _F_a_s_t_S_e_t: public std::set, │ │ │ │ -50 typename internal::FastDefaultAllocator::type> { │ │ │ │ +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 BOOST_CONCEPT_ASSERT ((_I_s_T_e_s_t_a_b_l_e_<_V_A_L_U_E_> )); │ │ │ │ -53 │ │ │ │ -54public: │ │ │ │ +52} // \namespace testing │ │ │ │ +53} // \namespace gtsam │ │ │ │ +54 │ │ │ │ 55 │ │ │ │ -56 typedef std::set, │ │ │ │ -57 typename internal::FastDefaultAllocator::type> Base; │ │ │ │ -58 │ │ │ │ -59 using Base::Base; // Inherit the set constructors │ │ │ │ -60 │ │ │ │ -_6_1 _F_a_s_t_S_e_t() = default; │ │ │ │ -62 │ │ │ │ -64 template │ │ │ │ -_6_5 explicit _F_a_s_t_S_e_t(const INPUTCONTAINER& container) : │ │ │ │ -66 Base(container.begin(), container.end()) { │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -_7_0 _F_a_s_t_S_e_t(const _F_a_s_t_S_e_t_<_V_A_L_U_E_>& x) : │ │ │ │ -71 Base(x) { │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -_7_5 _F_a_s_t_S_e_t(const Base& x) : │ │ │ │ -76 Base(x) { │ │ │ │ -77 } │ │ │ │ -78 │ │ │ │ -79#ifdef GTSAM_ALLOCATOR_BOOSTPOOL │ │ │ │ -81 _F_a_s_t_S_e_t(const std::set& x) { │ │ │ │ -82 // This if statement works around a bug in boost pool allocator and/or │ │ │ │ -83 // STL vector where if the size is zero, the pool allocator will allocate │ │ │ │ -84 // huge amounts of memory. │ │ │ │ -85 if(x.size() > 0) │ │ │ │ -86 Base::insert(x.begin(), x.end()); │ │ │ │ -87 } │ │ │ │ -88#endif │ │ │ │ -89 │ │ │ │ -_9_1 operator std::set() const { │ │ │ │ -92 return std::set(this->begin(), this->end()); │ │ │ │ -93 } │ │ │ │ -94 │ │ │ │ -_9_6 bool _e_x_i_s_t_s(const VALUE& e) const { │ │ │ │ -97 return this->find(e) != this->end(); │ │ │ │ -98 } │ │ │ │ -99 │ │ │ │ -_1_0_1 void _p_r_i_n_t(const std::string& str = "") const { │ │ │ │ -102 for (typename Base::const_iterator it = this->begin(); it != this->end(); │ │ │ │ -++it) │ │ │ │ -103 _t_r_a_i_t_s_<_V_A_L_U_E_>_:_:_P_r_i_n_t(*it, str); │ │ │ │ -104 } │ │ │ │ -105 │ │ │ │ -_1_0_7 bool _e_q_u_a_l_s(const _F_a_s_t_S_e_t_<_V_A_L_U_E_>& other, double tol = 1e-9) const { │ │ │ │ -108 typename Base::const_iterator it1 = this->begin(), it2 = other.begin(); │ │ │ │ -109 while (it1 != this->end()) { │ │ │ │ -110 if (it2 == other.end() || !_t_r_a_i_t_s_<_V_A_L_U_E_>_:_:_E_q_u_a_l_s(*it2, *it2, tol)) │ │ │ │ -111 return false; │ │ │ │ -112 ++it1; │ │ │ │ -113 ++it2; │ │ │ │ -114 } │ │ │ │ -115 return true; │ │ │ │ -116 } │ │ │ │ -117 │ │ │ │ -_1_1_9 void _m_e_r_g_e(const _F_a_s_t_S_e_t& other) { │ │ │ │ -120 Base::insert(other.begin(), other.end()); │ │ │ │ -121 } │ │ │ │ -122 │ │ │ │ -123private: │ │ │ │ -_1_2_5 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; │ │ │ │ -126 template │ │ │ │ -127 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -128 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); │ │ │ │ -129 } │ │ │ │ -130}; │ │ │ │ -131 │ │ │ │ -132} │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_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_:_:_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_:_:_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_:_:_F_a_s_t_S_e_t │ │ │ │ -FastSet is a thin wrapper around std::set that uses the boost │ │ │ │ -fast_pool_allocator instead of the defa... │ │ │ │ -DDeeffiinniittiioonn FastSet.h:50 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_m_e_r_g_e │ │ │ │ -void merge(const FastSet &other) │ │ │ │ -insert another set: handy for MATLAB access │ │ │ │ -DDeeffiinniittiioonn FastSet.h:119 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &str="") const │ │ │ │ -Print to implement Testable: pretty basic. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:101 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ -FastSet(const INPUTCONTAINER &container) │ │ │ │ -Constructor from a iterable container, passes through to base class. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:65 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ -FastSet(const FastSet< VALUE > &x) │ │ │ │ -Copy constructor from another FastSet. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:70 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_e_x_i_s_t_s │ │ │ │ -bool exists(const VALUE &e) const │ │ │ │ -Handy 'exists' function. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:96 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const FastSet< VALUE > &other, double tol=1e-9) const │ │ │ │ -Check for equality within tolerance to implement Testable. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:107 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:125 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ -FastSet(const Base &x) │ │ │ │ -Copy constructor from the base set class. │ │ │ │ -DDeeffiinniittiioonn FastSet.h:75 │ │ │ │ -_g_t_s_a_m_:_:_F_a_s_t_S_e_t_:_:_F_a_s_t_S_e_t │ │ │ │ -FastSet()=default │ │ │ │ -Default constructor. │ │ │ │ -_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 │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_S_e_t_._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/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/timing.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,211 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
FastList.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
timing.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Timing utilities. │ │ │ 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::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
 
│ │ │

Detailed Description

│ │ │ -

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

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

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);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -FastList.h File Reference │ │ │ │ -A thin wrapper around std::list that uses boost's fast_pool_allocator. _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 │ │ │ │ -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_:_:_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 │ │ │ │ +  │ │ │ │ + GTSAM_EXTERN_EXPORT boost::weak_ptr< │ │ │ │ + _T_i_m_i_n_g_O_u_t_l_i_n_e >  ggttssaamm::::iinntteerrnnaall::::ggCCuurrrreennttTTiimmeerr │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A thin wrapper around std::list that uses boost's fast_pool_allocator. │ │ │ │ +Timing utilities. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + Richard Roberts, Michael Kaess │ │ │ │ Date │ │ │ │ - Oct 22, 2010 │ │ │ │ + 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); │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _F_a_s_t_L_i_s_t_._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/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/timing.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,99 +98,328 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FastList.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
│ │ │ -
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 {
│ │ │ +
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
│ │ │ -
39template<typename VALUE>
│ │ │ -
│ │ │ -
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());
│ │ │ -
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.
│ │ │ +
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.
│ │ │
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
│ │ │ +
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,114 +1,394 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FastList.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 │ │ │ │ -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 { │ │ │ │ +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 │ │ │ │ -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()); │ │ │ │ -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. │ │ │ │ +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. │ │ │ │ _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_:_:_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 │ │ │ │ - * _F_a_s_t_L_i_s_t_._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/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/Group.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,47 +95,118 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
DSFVector.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
Group.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Concept check class for variable types with Group properties. │ │ │ 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...
struct  gtsam::group_tag
 tag to assert a type is a group More...
 
class  gtsam::DSFVector
 DSFVector additionally keeps a vector of keys to support more expensive operations. 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<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

│ │ │ -

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

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

Concept check class for variable types with Group properties.

│ │ │ +
Date
November, 2011
│ │ │ +
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

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 │ │ │ │ -DSFVector.h 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 | _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 │ │ │ │ -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_._._. │ │ │ │ +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 │ │ │ │ +  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 ********** │ │ │ │ -A faster implementation for DSF, which uses vector rather than btree. │ │ │ │ +Concept check class for variable types with Group properties. │ │ │ │ Date │ │ │ │ - Jun 25, 2010 │ │ │ │ + November, 2011 │ │ │ │ Author │ │ │ │ - Kai Ni │ │ │ │ + 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 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._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/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/Group.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,96 +98,220 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DSFVector.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#pragma once
│ │ │ -
20
│ │ │ -
21#include <gtsam/dllexport.h>
│ │ │ - │ │ │ -
23
│ │ │ -
24#include <boost/shared_ptr.hpp>
│ │ │ -
25
│ │ │ -
26#include <vector>
│ │ │ -
27#include <set>
│ │ │ -
28#include <map>
│ │ │ -
29
│ │ │ -
30namespace gtsam {
│ │ │ -
31
│ │ │ -
│ │ │ -
38class GTSAM_EXPORT DSFBase {
│ │ │ +
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
│ │ │ -
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;
│ │ │ +
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
│ │ │ -
91 std::map<size_t, std::vector<size_t> > arrays() const;
│ │ │ -
92};
│ │ │ +
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> > {};
│ │ │
│ │ │ -
93
│ │ │ -
94}
│ │ │ -
Included from all GTSAM files.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,97 +1,237 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DSFVector.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#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> │ │ │ │ -23 │ │ │ │ -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 { │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +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 │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ -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. │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._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/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/DSFMap.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,74 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
DSFVector.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
DSFMap.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

│ │ │ +IndexPairVector gtsam::IndexPairSetAsArray (IndexPairSet &set)
 
│ │ │

Detailed Description

│ │ │ -

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

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

Allow for arbitrary type in DSF.

│ │ │ +
Date
Oct 26, 2013
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,48 @@ │ │ │ │ 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 | _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 │ │ │ │ +IndexPairVector  ggttssaamm::::IInnddeexxPPaaiirrSSeettAAssAArrrraayy (IndexPairSet &set) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -a faster implementation for DSF, which uses vector rather than btree. │ │ │ │ +Allow for arbitrary type in DSF. │ │ │ │ Date │ │ │ │ - Jun 25, 2010 │ │ │ │ + Oct 26, 2013 │ │ │ │ Author │ │ │ │ - Kai Ni │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_V_e_c_t_o_r_._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/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/treeTraversal-inst.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,74 +94,61 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
DSFMap.h File Reference
│ │ │ +
treeTraversal-inst.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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
 
namespace  gtsam::treeTraversal
 Internal functions used for traversing trees.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -IndexPairVector gtsam::IndexPairSetAsArray (IndexPairSet &set)
 
template<class FOREST , typename DATA , typename VISITOR_PRE , typename VISITOR_POST >
void gtsam::treeTraversal::DepthFirstForest (FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre, VISITOR_POST &visitorPost)
 Traverse a forest depth-first with pre-order and post-order visits.
 
template<class FOREST , typename DATA , typename VISITOR_PRE >
void gtsam::treeTraversal::DepthFirstForest (FOREST &forest, DATA &rootData, VISITOR_PRE &visitorPre)
 Traverse a forest depth-first, with a pre-order visit but no post-order visit.
 
template<class FOREST , typename DATA , typename VISITOR_PRE , typename VISITOR_POST >
void gtsam::treeTraversal::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.
 
template<class FOREST >
FastVector< boost::shared_ptr< typename FOREST::Node > > gtsam::treeTraversal::CloneForest (const FOREST &forest)
 Clone a tree, copy-constructing new nodes (calling boost::make_shared) and setting up child pointers for a clone of the original tree.
 
template<class FOREST >
void gtsam::treeTraversal::PrintForest (const FOREST &forest, std::string str, const KeyFormatter &keyFormatter)
 Print a tree, prefixing each line with str, and formatting keys using keyFormatter.
 
│ │ │

Detailed Description

│ │ │ -

Allow for arbitrary type in DSF.

│ │ │ -
Date
Oct 26, 2013
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Author
Richard Roberts
│ │ │ +
Date
April 9, 2013
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +1,68 @@ │ │ │ │ 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 | _F_u_n_c_t_i_o_n_s │ │ │ │ +treeTraversal-inst.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_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 │ │ │ │ +namespace   _g_t_s_a_m_:_:_t_r_e_e_T_r_a_v_e_r_s_a_l │ │ │ │ +  Internal functions used for traversing trees. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -IndexPairVector  ggttssaamm::::IInnddeexxPPaaiirrSSeettAAssAArrrraayy (IndexPairSet &set) │ │ │ │ +template │ │ │ │ + void  _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 │ │ │ │ + (FOREST &forest, DATA &rootData, │ │ │ │ + VISITOR_PRE &visitorPre, VISITOR_POST │ │ │ │ + &visitorPost) │ │ │ │ +  Traverse a forest depth-first with pre- │ │ │ │ + order and post-order visits. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  _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 │ │ │ │ + (FOREST &forest, DATA &rootData, │ │ │ │ + VISITOR_PRE &visitorPre) │ │ │ │ + Traverse a forest depth-first, with a │ │ │ │ +  pre-order visit but no post-order │ │ │ │ + visit. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  _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 (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. │ │ │ │ +  │ │ │ │ +template │ │ │ │ +_F_a_s_t_V_e_c_t_o_r< boost::shared_ptr< typename _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 │ │ │ │ + FOREST::Node > >  (const FOREST &forest) │ │ │ │ + Clone a tree, copy-constructing new │ │ │ │ +  nodes (calling boost::make_shared) and │ │ │ │ + setting up child pointers for a clone │ │ │ │ + of the original tree. │ │ │ │ +  │ │ │ │ +template │ │ │ │ + void  _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 │ │ │ │ + (const FOREST &forest, std::string str, │ │ │ │ + const _K_e_y_F_o_r_m_a_t_t_e_r &keyFormatter) │ │ │ │ + Print a tree, prefixing each line with │ │ │ │ +  str, and formatting keys using │ │ │ │ + keyFormatter. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Allow for arbitrary type in DSF. │ │ │ │ - Date │ │ │ │ - Oct 26, 2013 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ + Date │ │ │ │ + April 9, 2013 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_e │ │ │ │ - * _D_S_F_M_a_p_._h │ │ │ │ + * _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/a00146.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,7 @@ │ │ │ │ var a00146 = [ │ │ │ │ - ["gtsam::DSFMap< KEY >::Entry", "a02288.html", null], │ │ │ │ - ["gtsam::IndexPair", "a02292.html", null] │ │ │ │ + ["CloneForest", "a00146.html#a67e7c6f5c4916c4a58a783e6b566d55a", null], │ │ │ │ + ["DepthFirstForest", "a00146.html#a3735d0cee6f4d530e75479f7b1ebaf07", null], │ │ │ │ + ["DepthFirstForest", "a00146.html#a50e24f0a9085721425089cdce18f2475", null], │ │ │ │ + ["DepthFirstForestParallel", "a00146.html#afd7410807789da9ad91d6630063be36f", null], │ │ │ │ + ["PrintForest", "a00146.html#a7228bbaf6ad62b65be7a2084c01aae5c", 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/treeTraversal-inst.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,161 +98,217 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DSFMap.h
│ │ │ +
treeTraversal-inst.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
│ │ │ +
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};
│ │ │ +
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.
│ │ │ + │ │ │ +
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
│ │ │ +
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,166 +1,243 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DSFMap.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 │ │ │ │ -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; │ │ │ │ +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 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 │ │ │ │ +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_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_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_:_:_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 │ │ │ │ - * _D_S_F_M_a_p_._h │ │ │ │ + * _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/a00149_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/ConcurrentMap.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/base/Value.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,140 +98,100 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ConcurrentMap.h
│ │ │ +
Value.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
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ +
21#include <gtsam/config.h> // Configuration from CMake
│ │ │
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>
│ │ │ - │ │ │ +
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
│ │ │ +
│ │ │ +
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
│ │ │ -
49#endif
│ │ │ -
50
│ │ │ -
51#include <boost/serialization/nvp.hpp>
│ │ │ -
52#include <boost/serialization/split_member.hpp>
│ │ │ -
53#include <boost/static_assert.hpp>
│ │ │ +
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
│ │ │ - │ │ │ -
56
│ │ │ -
57namespace gtsam {
│ │ │ -
58
│ │ │ -
67template<typename KEY, typename VALUE>
│ │ │ -
│ │ │ -
68class ConcurrentMap : public ConcurrentMapBase<KEY,VALUE> {
│ │ │ +
60 virtual size_t dim() const = 0;
│ │ │ +
61
│ │ │ +
68 virtual Value* retract_(const Vector& delta) const = 0;
│ │ │
69
│ │ │ -
70public:
│ │ │ -
71
│ │ │ - │ │ │ -
73
│ │ │ - │ │ │ -
76
│ │ │ -
78 template<typename INPUTITERATOR>
│ │ │ -
79 ConcurrentMap(INPUTITERATOR first, INPUTITERATOR last) : Base(first, last) {}
│ │ │ -
80
│ │ │ - │ │ │ +
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 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::vector that uses a custom allocator.
│ │ │ -
A thin wrapper around std::map that uses boost's fast_pool_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
│ │ │ +
85 template<typename ValueType>
│ │ │ +
86 const ValueType& cast() const;
│ │ │ +
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*/) {
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,13 +1,14 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -ConcurrentMap.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) │ │ │ │ @@ -15,154 +16,104 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 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> │ │ │ │ +21#include // Configuration from CMake │ │ │ │ 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_>; │ │ │ │ +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 │ │ │ │ -49#endif │ │ │ │ -50 │ │ │ │ -51#include │ │ │ │ -52#include │ │ │ │ -53#include │ │ │ │ +_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 │ │ │ │ -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 │ │ │ │ -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 { │ │ │ │ +_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 │ │ │ │ -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) {} │ │ │ │ +_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 │ │ │ │ -_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_V_e_c_t_o_r_._h │ │ │ │ -A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ -_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_:_:_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 │ │ │ │ +85 template │ │ │ │ +86 const ValueType& cast() const; │ │ │ │ +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*/) { │ │ │ │ +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_:_:_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_:_:_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 │ │ │ │ - * CCoonnccuurrrreennttMMaapp..hh │ │ │ │ + * _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/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/Fourier.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,54 +95,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
ParameterMatrix.h File Reference
│ │ │ +Namespaces
│ │ │ +
Fourier.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Fourier decomposition, see e.g. │ │ │ 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...
 
struct  gtsam::traits< ParameterMatrix< M > >
class  gtsam::FourierBasis
 Fourier basis. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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

│ │ │ -

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

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

Fourier decomposition, see e.g.

│ │ │ +

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

Author
Varun Agrawal, Frank Dellaert
│ │ │ +
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +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 | _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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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. │ │ │ │   │ │ │ │ -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 ********** │ │ │ │ -Define ParameterMatrix class which is used to store values at interpolation │ │ │ │ -points. │ │ │ │ +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, 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 │ │ │ │ + * _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/a00152.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00152 = [ │ │ │ │ - ["gtsam::ParameterMatrix< M >", "a02752.html", "a02752"], │ │ │ │ - ["gtsam::traits< ParameterMatrix< M > >", "a02756.html", null] │ │ │ │ + ["gtsam::FourierBasis", "a02748.html", 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/Fourier.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
ParameterMatrix.h
│ │ │ +
Fourier.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,192 +114,90 @@ │ │ │
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>
│ │ │ +
22#include <gtsam/basis/Basis.h>
│ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │
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_; }
│ │ │ -
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
│ │ │ -
│ │ │ -
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 }
│ │ │ +
│ │ │ +
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 }
│ │ │ +
│ │ │ +
53
│ │ │ +
│ │ │ +
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 }
│ │ │
│ │ │ -
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
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
110}; // FourierBasis
│ │ │ +
│ │ │ +
111
│ │ │ +
112} // namespace gtsam
│ │ │ +
Compute an interpolating basis.
│ │ │
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
│ │ │ -
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
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -ParameterMatrix.h │ │ │ │ +Fourier.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,237 +16,94 @@ │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -_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(); } │ │ │ │ +_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 } │ │ │ │ +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 │ │ │ │ -_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. │ │ │ │ -_M_a_t_r_i_x_._h │ │ │ │ -typedef and functions to augment Eigen's MatrixXd │ │ │ │ +110}; // FourierBasis │ │ │ │ +111 │ │ │ │ +112} // namespace gtsam │ │ │ │ +_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_:_:_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 │ │ │ │ +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 │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_._h │ │ │ │ + * _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/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/BasisFactors.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,61 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Fourier.h File Reference
│ │ │ +
BasisFactors.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

Factor definitions for various Basis functors. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::FourierBasis
 Fourier basis. More...
class  gtsam::EvaluationFactor< BASIS >
 Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the measurement z when using a pseudo-spectral parameterization. More...
 
class  gtsam::VectorEvaluationFactor< BASIS, M >
 Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (M, N) is equal to a vector-valued measurement at the same point, when using a pseudo-spectral parameterization. More...
 
class  gtsam::VectorComponentFactor< BASIS, P >
 Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (P, N) is equal to specified measurement at the same point, when using a pseudo-spectral parameterization. More...
 
class  gtsam::ManifoldEvaluationFactor< BASIS, T >
 For a measurement value of type T i.e. More...
 
class  gtsam::DerivativeFactor< BASIS >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified pointx is equal to the scalar measurement z. More...
 
class  gtsam::VectorDerivativeFactor< BASIS, M >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified point x is equal to the vector value z. More...
 
class  gtsam::ComponentDerivativeFactor< BASIS, P >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial is equal to the scalar value at a specific index i of a vector-valued measurement z. 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
│ │ │ +

Factor definitions for various Basis functors.

│ │ │ +
Author
Varun Agrawal
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,58 @@ │ │ │ │ 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_._._. │ │ │ │ +BasisFactors.h File Reference │ │ │ │ +Factor definitions for various Basis functors. _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_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_ _> │ │ │ │ + _F_a_c_t_o_r for enforcing the scalar value of the polynomial BASIS │ │ │ │ +  representation at x is the same as the measurement z when using a │ │ │ │ + pseudo-spectral parameterization. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _M_ _> │ │ │ │ + Unary factor for enforcing BASIS polynomial evaluation on a │ │ │ │ +  _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x of size (M, N) is equal to a vector-valued measurement │ │ │ │ + at the same point, when using a pseudo-spectral parameterization. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _P_ _> │ │ │ │ + Unary factor for enforcing BASIS polynomial evaluation on a │ │ │ │ +  _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x of size (P, N) is equal to specified measurement at the │ │ │ │ + same point, when using a pseudo-spectral parameterization. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _T_ _> │ │ │ │ +  For a measurement value of type T i.e. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_ _> │ │ │ │ + A unary factor which enforces the evaluation of the derivative of a │ │ │ │ +  BASIS polynomial at a specified pointx is equal to the scalar │ │ │ │ + measurement z. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _M_ _> │ │ │ │ + A unary factor which enforces the evaluation of the derivative of a │ │ │ │ +  BASIS polynomial at a specified point x is equal to the vector value z. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +class   _g_t_s_a_m_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _P_ _> │ │ │ │ + A unary factor which enforces the evaluation of the derivative of a │ │ │ │ +  BASIS polynomial is equal to the scalar value at a specific index i of │ │ │ │ + a vector-valued measurement z. _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 │ │ │ │ +Factor definitions for various Basis functors. │ │ │ │ Author │ │ │ │ - Varun Agrawal, Frank Dellaert │ │ │ │ + Varun Agrawal │ │ │ │ Date │ │ │ │ July 4, 2020 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_o_u_r_i_e_r_._h │ │ │ │ + * _B_a_s_i_s_F_a_c_t_o_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/a00155.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00155 = [ │ │ │ │ - ["gtsam::FourierBasis", "a02748.html", null] │ │ │ │ + ["gtsam::ManifoldEvaluationFactor< BASIS, T >", "a02716.html", "a02716"], │ │ │ │ + ["gtsam::DerivativeFactor< BASIS >", "a02720.html", "a02720"], │ │ │ │ + ["gtsam::VectorDerivativeFactor< BASIS, M >", "a02724.html", "a02724"], │ │ │ │ + ["gtsam::ComponentDerivativeFactor< BASIS, P >", "a02728.html", "a02728"] │ │ │ │ ]; │ │ ├── ./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/BasisFactors.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,106 +98,267 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Fourier.h
│ │ │ +
BasisFactors.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>
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#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 }
│ │ │ -
│ │ │ -
53
│ │ │ -
│ │ │ -
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.
│ │ │ +
38template <class BASIS>
│ │ │ +
│ │ │ +
39class EvaluationFactor : public FunctorizedFactor<double, Vector> {
│ │ │ +
40 private:
│ │ │ + │ │ │ +
42
│ │ │ +
43 public:
│ │ │ + │ │ │ +
45
│ │ │ +
│ │ │ +
55 EvaluationFactor(Key key, double z, const SharedNoiseModel &model,
│ │ │ +
56 const size_t N, double x)
│ │ │ +
57 : Base(key, z, model, typename BASIS::EvaluationFunctor(N, x)) {}
│ │ │ +
│ │ │ +
58
│ │ │ +
│ │ │ +
70 EvaluationFactor(Key key, double z, const SharedNoiseModel &model,
│ │ │ +
71 const size_t N, double x, double a, double b)
│ │ │ +
72 : Base(key, z, model, typename BASIS::EvaluationFunctor(N, x, a, b)) {}
│ │ │ +
│ │ │ +
73
│ │ │ +
74 virtual ~EvaluationFactor() {}
│ │ │ +
75};
│ │ │ +
│ │ │ +
76
│ │ │ +
94template <class BASIS, int M>
│ │ │ +
│ │ │ + │ │ │ +
96 : public FunctorizedFactor<Vector, ParameterMatrix<M>> {
│ │ │ +
97 private:
│ │ │ + │ │ │ +
99
│ │ │ +
100 public:
│ │ │ + │ │ │ +
102
│ │ │ +
│ │ │ + │ │ │ +
114 const SharedNoiseModel &model, const size_t N,
│ │ │ +
115 double x)
│ │ │ +
116 : Base(key, z, model,
│ │ │ +
117 typename BASIS::template VectorEvaluationFunctor<M>(N, x)) {}
│ │ │ +
│ │ │ +
118
│ │ │ +
│ │ │ + │ │ │ +
132 const SharedNoiseModel &model, const size_t N,
│ │ │ +
133 double x, double a, double b)
│ │ │ +
134 : Base(key, z, model,
│ │ │ +
135 typename BASIS::template VectorEvaluationFunctor<M>(N, x, a, b)) {}
│ │ │ +
│ │ │ +
136
│ │ │ +
137 virtual ~VectorEvaluationFactor() {}
│ │ │ +
138};
│ │ │ +
│ │ │ +
139
│ │ │ +
159template <class BASIS, size_t P>
│ │ │ +
│ │ │ + │ │ │ +
161 : public FunctorizedFactor<double, ParameterMatrix<P>> {
│ │ │ +
162 private:
│ │ │ + │ │ │ +
164
│ │ │ +
165 public:
│ │ │ + │ │ │ +
167
│ │ │ +
│ │ │ +
181 VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model,
│ │ │ +
182 const size_t N, size_t i, double x)
│ │ │ +
183 : Base(key, z, model,
│ │ │ +
184 typename BASIS::template VectorComponentFunctor<P>(N, i, x)) {}
│ │ │ +
│ │ │ +
185
│ │ │ +
│ │ │ +
201 VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model,
│ │ │ +
202 const size_t N, size_t i, double x, double a, double b)
│ │ │ +
203 : Base(
│ │ │ +
204 key, z, model,
│ │ │ +
205 typename BASIS::template VectorComponentFunctor<P>(N, i, x, a, b)) {
│ │ │ +
206 }
│ │ │ +
│ │ │ +
207
│ │ │ +
208 virtual ~VectorComponentFactor() {}
│ │ │ +
209};
│ │ │ +
│ │ │ +
210
│ │ │ +
228template <class BASIS, typename T>
│ │ │ +
│ │ │ + │ │ │ +
230 : public FunctorizedFactor<T, ParameterMatrix<traits<T>::dimension>> {
│ │ │ +
231 private:
│ │ │ + │ │ │ +
233
│ │ │ +
234 public:
│ │ │ + │ │ │ +
236
│ │ │ +
│ │ │ + │ │ │ +
248 const size_t N, double x)
│ │ │ +
249 : Base(key, z, model,
│ │ │ +
250 typename BASIS::template ManifoldEvaluationFunctor<T>(N, x)) {}
│ │ │ +
│ │ │ +
251
│ │ │ +
│ │ │ + │ │ │ +
265 const size_t N, double x, double a, double b)
│ │ │ +
266 : Base(
│ │ │ +
267 key, z, model,
│ │ │ +
268 typename BASIS::template ManifoldEvaluationFunctor<T>(N, x, a, b)) {
│ │ │ +
269 }
│ │ │ +
│ │ │ +
270
│ │ │ +
271 virtual ~ManifoldEvaluationFactor() {}
│ │ │ +
272};
│ │ │ +
│ │ │ +
273
│ │ │ +
280template <class BASIS>
│ │ │ +
│ │ │ + │ │ │ +
282 : public FunctorizedFactor<double, typename BASIS::Parameters> {
│ │ │ +
283 private:
│ │ │ + │ │ │ +
285
│ │ │ +
286 public:
│ │ │ + │ │ │ +
288
│ │ │ +
│ │ │ +
299 DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model,
│ │ │ +
300 const size_t N, double x)
│ │ │ +
301 : Base(key, z, model, typename BASIS::DerivativeFunctor(N, x)) {}
│ │ │ +
│ │ │ +
302
│ │ │ +
│ │ │ +
315 DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model,
│ │ │ +
316 const size_t N, double x, double a, double b)
│ │ │ +
317 : Base(key, z, model, typename BASIS::DerivativeFunctor(N, x, a, b)) {}
│ │ │ +
│ │ │ +
318
│ │ │ +
319 virtual ~DerivativeFactor() {}
│ │ │ +
320};
│ │ │ +
│ │ │ +
321
│ │ │ +
329template <class BASIS, int M>
│ │ │ +
│ │ │ + │ │ │ +
331 : public FunctorizedFactor<Vector, ParameterMatrix<M>> {
│ │ │ +
332 private:
│ │ │ + │ │ │ +
334 using Func = typename BASIS::template VectorDerivativeFunctor<M>;
│ │ │ +
335
│ │ │ +
336 public:
│ │ │ + │ │ │ +
338
│ │ │ +
│ │ │ + │ │ │ +
350 const SharedNoiseModel &model, const size_t N,
│ │ │ +
351 double x)
│ │ │ +
352 : Base(key, z, model, Func(N, x)) {}
│ │ │ +
│ │ │ +
353
│ │ │ +
│ │ │ + │ │ │ +
367 const SharedNoiseModel &model, const size_t N,
│ │ │ +
368 double x, double a, double b)
│ │ │ +
369 : Base(key, z, model, Func(N, x, a, b)) {}
│ │ │ +
│ │ │ +
370
│ │ │ +
371 virtual ~VectorDerivativeFactor() {}
│ │ │ +
372};
│ │ │ +
│ │ │ +
373
│ │ │ +
382template <class BASIS, int P>
│ │ │ +
│ │ │ + │ │ │ +
384 : public FunctorizedFactor<double, ParameterMatrix<P>> {
│ │ │ +
385 private:
│ │ │ + │ │ │ +
387 using Func = typename BASIS::template ComponentDerivativeFunctor<P>;
│ │ │ +
388
│ │ │ +
389 public:
│ │ │ + │ │ │ +
391
│ │ │ +
│ │ │ + │ │ │ +
406 const SharedNoiseModel &model, const size_t N,
│ │ │ +
407 size_t i, double x)
│ │ │ +
408 : Base(key, z, model, Func(N, i, x)) {}
│ │ │ +
│ │ │ +
409
│ │ │ +
│ │ │ + │ │ │ +
426 const SharedNoiseModel &model, const size_t N,
│ │ │ +
427 size_t i, double x, double a, double b)
│ │ │ +
428 : Base(key, z, model, Func(N, i, x, a, b)) {}
│ │ │ +
│ │ │ +
429
│ │ │ +
430 virtual ~ComponentDerivativeFactor() {}
│ │ │ +
431};
│ │ │ +
│ │ │ +
432
│ │ │ +
433} // namespace gtsam
│ │ │ +
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
│ │ │ +
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
│ │ │ +
VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new VectorEvaluationFactor object.
Definition BasisFactors.h:131
│ │ │ +
VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new VectorEvaluationFactor object.
Definition BasisFactors.h:113
│ │ │ +
Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (P,...
Definition BasisFactors.h:161
│ │ │ +
VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, size_t i, double x, double a, double b)
Construct a new VectorComponentFactor object.
Definition BasisFactors.h:201
│ │ │ +
VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, size_t i, double x)
Construct a new VectorComponentFactor object.
Definition BasisFactors.h:181
│ │ │ +
For a measurement value of type T i.e.
Definition BasisFactors.h:230
│ │ │ +
ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new ManifoldEvaluationFactor object.
Definition BasisFactors.h:264
│ │ │ +
ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new ManifoldEvaluationFactor object.
Definition BasisFactors.h:247
│ │ │ +
A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified p...
Definition BasisFactors.h:282
│ │ │ +
DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new DerivativeFactor object.
Definition BasisFactors.h:315
│ │ │ +
DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new DerivativeFactor object.
Definition BasisFactors.h:299
│ │ │ +
A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified p...
Definition BasisFactors.h:331
│ │ │ +
VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new VectorDerivativeFactor object.
Definition BasisFactors.h:349
│ │ │ +
VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new VectorDerivativeFactor object.
Definition BasisFactors.h:366
│ │ │ +
A unary factor which enforces the evaluation of the derivative of a BASIS polynomial is equal to the ...
Definition BasisFactors.h:384
│ │ │ +
ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, size_t i, double x, double a, double b)
Construct a new ComponentDerivativeFactor object.
Definition BasisFactors.h:425
│ │ │ +
ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, size_t i, double x)
Construct a new ComponentDerivativeFactor object.
Definition BasisFactors.h:405
│ │ │ +
Factor which evaluates provided unary functor and uses the result to compute error with respect to th...
Definition FunctorizedFactor.h:59
│ │ │ +
Key key() const
Returns a key.
Definition NonlinearFactor.h:518
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,109 +1,312 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Fourier.h │ │ │ │ +BasisFactors.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> │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_._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 } │ │ │ │ -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 │ │ │ │ +38template │ │ │ │ +_3_9class _E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r { │ │ │ │ +40 private: │ │ │ │ +41 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_d_o_u_b_l_e_,_ _V_e_c_t_o_r_>; │ │ │ │ +42 │ │ │ │ +43 public: │ │ │ │ +44 _E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +45 │ │ │ │ +_5_5 _E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, double z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, │ │ │ │ +56 const size_t N, double x) │ │ │ │ +57 : _B_a_s_e(_k_e_y, z, model, typename BASIS::EvaluationFunctor(N, x)) {} │ │ │ │ +58 │ │ │ │ +_7_0 _E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, double z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, │ │ │ │ +71 const size_t N, double x, double a, double b) │ │ │ │ +72 : _B_a_s_e(_k_e_y, z, model, typename BASIS::EvaluationFunctor(N, x, a, b)) {} │ │ │ │ +73 │ │ │ │ +74 virtual _~_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +75}; │ │ │ │ +76 │ │ │ │ +94template │ │ │ │ +_9_5class _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +96 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r> { │ │ │ │ +97 private: │ │ │ │ +98 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_V_e_c_t_o_r_,_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>>; │ │ │ │ +99 │ │ │ │ +100 public: │ │ │ │ +101 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +102 │ │ │ │ +_1_1_3 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, const Vector &z, │ │ │ │ +114 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +115 double x) │ │ │ │ +116 : _B_a_s_e(_k_e_y, z, model, │ │ │ │ +117 typename BASIS::template VectorEvaluationFunctor(N, x)) {} │ │ │ │ +118 │ │ │ │ +_1_3_1 _V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, const Vector &z, │ │ │ │ +132 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +133 double x, double a, double b) │ │ │ │ +134 : _B_a_s_e(_k_e_y, z, model, │ │ │ │ +135 typename BASIS::template VectorEvaluationFunctor(N, x, a, b)) {} │ │ │ │ +136 │ │ │ │ +137 virtual _~_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +138}; │ │ │ │ +139 │ │ │ │ +159template │ │ │ │ +_1_6_0class _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r │ │ │ │ +161 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r> { │ │ │ │ +162 private: │ │ │ │ +163 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_d_o_u_b_l_e_,_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_P_>>; │ │ │ │ +164 │ │ │ │ +165 public: │ │ │ │ +166 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r() {} │ │ │ │ +167 │ │ │ │ +_1_8_1 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ +&model, │ │ │ │ +182 const size_t N, size_t i, double x) │ │ │ │ +183 : _B_a_s_e(_k_e_y, z, model, │ │ │ │ +184 typename BASIS::template VectorComponentFunctor

(N, i, x)) {} │ │ │ │ +185 │ │ │ │ +_2_0_1 _V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ +&model, │ │ │ │ +202 const size_t N, size_t i, double x, double a, double b) │ │ │ │ +203 : _B_a_s_e( │ │ │ │ +204 _k_e_y, z, model, │ │ │ │ +205 typename BASIS::template VectorComponentFunctor

(N, i, x, a, b)) { │ │ │ │ +206 } │ │ │ │ +207 │ │ │ │ +208 virtual _~_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r() {} │ │ │ │ +209}; │ │ │ │ +210 │ │ │ │ +228template │ │ │ │ +_2_2_9class _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +230 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r::dimension>> { │ │ │ │ +231 private: │ │ │ │ +232 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_T_,_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_t_r_a_i_t_s_<_T_>_:_:_d_i_m_e_n_s_i_o_n>>; │ │ │ │ +233 │ │ │ │ +234 public: │ │ │ │ +235 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +236 │ │ │ │ +_2_4_7 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, const T &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ +&model, │ │ │ │ +248 const size_t N, double x) │ │ │ │ +249 : _B_a_s_e(_k_e_y, z, model, │ │ │ │ +250 typename BASIS::template ManifoldEvaluationFunctor(N, x)) {} │ │ │ │ +251 │ │ │ │ +_2_6_4 _M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r(_K_e_y _k_e_y, const T &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l │ │ │ │ +&model, │ │ │ │ +265 const size_t N, double x, double a, double b) │ │ │ │ +266 : _B_a_s_e( │ │ │ │ +267 _k_e_y, z, model, │ │ │ │ +268 typename BASIS::template ManifoldEvaluationFunctor(N, x, a, b)) { │ │ │ │ +269 } │ │ │ │ +270 │ │ │ │ +271 virtual _~_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r() {} │ │ │ │ +272}; │ │ │ │ +273 │ │ │ │ +280template │ │ │ │ +_2_8_1class _D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +282 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r { │ │ │ │ +283 private: │ │ │ │ +284 using Base = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_d_o_u_b_l_e_,_ _t_y_p_e_n_a_m_e_ _B_A_S_I_S_:_:_P_a_r_a_m_e_t_e_r_s_>; │ │ │ │ +285 │ │ │ │ +286 public: │ │ │ │ +287 _D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +288 │ │ │ │ +_2_9_9 _D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, │ │ │ │ +300 const size_t N, double x) │ │ │ │ +301 : Base(_k_e_y, z, model, typename BASIS::DerivativeFunctor(N, x)) {} │ │ │ │ +302 │ │ │ │ +_3_1_5 _D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, │ │ │ │ +316 const size_t N, double x, double a, double b) │ │ │ │ +317 : Base(_k_e_y, z, model, typename BASIS::DerivativeFunctor(N, x, a, b)) {} │ │ │ │ +318 │ │ │ │ +319 virtual _~_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +320}; │ │ │ │ +321 │ │ │ │ +329template │ │ │ │ +_3_3_0class _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +331 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r> { │ │ │ │ +332 private: │ │ │ │ +333 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_V_e_c_t_o_r_,_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_M_>>; │ │ │ │ +334 using Func = typename BASIS::template VectorDerivativeFunctor; │ │ │ │ +335 │ │ │ │ +336 public: │ │ │ │ +337 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +338 │ │ │ │ +_3_4_9 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const Vector &z, │ │ │ │ +350 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +351 double x) │ │ │ │ +352 : _B_a_s_e(_k_e_y, z, model, Func(N, x)) {} │ │ │ │ +353 │ │ │ │ +_3_6_6 _V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const Vector &z, │ │ │ │ +367 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +368 double x, double a, double b) │ │ │ │ +369 : _B_a_s_e(_k_e_y, z, model, Func(N, x, a, b)) {} │ │ │ │ +370 │ │ │ │ +371 virtual _~_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +372}; │ │ │ │ +373 │ │ │ │ +382template │ │ │ │ +_3_8_3class _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +384 : public _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r> { │ │ │ │ +385 private: │ │ │ │ +386 using _B_a_s_e = _F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_<_d_o_u_b_l_e_,_ _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x_<_P_>>; │ │ │ │ +387 using Func = typename BASIS::template ComponentDerivativeFunctor

; │ │ │ │ +388 │ │ │ │ +389 public: │ │ │ │ +390 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +391 │ │ │ │ +_4_0_5 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, │ │ │ │ +406 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +407 size_t i, double x) │ │ │ │ +408 : _B_a_s_e(_k_e_y, z, model, Func(N, i, x)) {} │ │ │ │ +409 │ │ │ │ +_4_2_5 _C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r(_K_e_y _k_e_y, const double &z, │ │ │ │ +426 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l &model, const size_t N, │ │ │ │ +427 size_t i, double x, double a, double b) │ │ │ │ +428 : _B_a_s_e(_k_e_y, z, model, Func(N, i, x, a, b)) {} │ │ │ │ +429 │ │ │ │ +430 virtual _~_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r() {} │ │ │ │ +431}; │ │ │ │ +432 │ │ │ │ +433} // namespace gtsam │ │ │ │ _B_a_s_i_s_._h │ │ │ │ Compute an interpolating basis. │ │ │ │ +_F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r_._h │ │ │ │ _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_:_:_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_:_:_K_e_y │ │ │ │ +std::uint64_t Key │ │ │ │ +Integer nonlinear key type. │ │ │ │ +DDeeffiinniittiioonn types.h:100 │ │ │ │ +_g_t_s_a_m_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +Factor for enforcing the scalar value of the polynomial BASIS representation at │ │ │ │ +x is the same as the ... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:39 │ │ │ │ +_g_t_s_a_m_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t │ │ │ │ +N, double x) │ │ │ │ +Construct a new EvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:55 │ │ │ │ +_g_t_s_a_m_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t │ │ │ │ +N, double x, double a, double b) │ │ │ │ +Construct a new EvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:70 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of │ │ │ │ +size (M,... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:96 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x, double a, double b) │ │ │ │ +Construct a new VectorEvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:131 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x) │ │ │ │ +Construct a new VectorEvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:113 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r │ │ │ │ +Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of │ │ │ │ +size (P,... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:161 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r │ │ │ │ +VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, size_t i, double x, double a, double b) │ │ │ │ +Construct a new VectorComponentFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:201 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r │ │ │ │ +VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, size_t i, double x) │ │ │ │ +Construct a new VectorComponentFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:181 │ │ │ │ +_g_t_s_a_m_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +For a measurement value of type T i.e. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:230 │ │ │ │ +_g_t_s_a_m_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x, double a, double b) │ │ │ │ +Construct a new ManifoldEvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:264 │ │ │ │ +_g_t_s_a_m_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x) │ │ │ │ +Construct a new ManifoldEvaluationFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:247 │ │ │ │ +_g_t_s_a_m_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +A unary factor which enforces the evaluation of the derivative of a BASIS │ │ │ │ +polynomial at a specified p... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:282 │ │ │ │ +_g_t_s_a_m_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const │ │ │ │ +size_t N, double x, double a, double b) │ │ │ │ +Construct a new DerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:315 │ │ │ │ +_g_t_s_a_m_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const │ │ │ │ +size_t N, double x) │ │ │ │ +Construct a new DerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:299 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +A unary factor which enforces the evaluation of the derivative of a BASIS │ │ │ │ +polynomial at a specified p... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:331 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x) │ │ │ │ +Construct a new VectorDerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:349 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, │ │ │ │ +const size_t N, double x, double a, double b) │ │ │ │ +Construct a new VectorDerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:366 │ │ │ │ +_g_t_s_a_m_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +A unary factor which enforces the evaluation of the derivative of a BASIS │ │ │ │ +polynomial is equal to the ... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:384 │ │ │ │ +_g_t_s_a_m_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel │ │ │ │ +&model, const size_t N, size_t i, double x, double a, double b) │ │ │ │ +Construct a new ComponentDerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:425 │ │ │ │ +_g_t_s_a_m_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r │ │ │ │ +ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel │ │ │ │ +&model, const size_t N, size_t i, double x) │ │ │ │ +Construct a new ComponentDerivativeFactor object. │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:405 │ │ │ │ +_g_t_s_a_m_:_:_F_u_n_c_t_o_r_i_z_e_d_F_a_c_t_o_r │ │ │ │ +Factor which evaluates provided unary functor and uses the result to compute │ │ │ │ +error with respect to th... │ │ │ │ +DDeeffiinniittiioonn FunctorizedFactor.h:59 │ │ │ │ +_g_t_s_a_m_:_:_N_o_i_s_e_M_o_d_e_l_F_a_c_t_o_r_N_:_:_k_e_y │ │ │ │ +Key key() const │ │ │ │ +Returns a key. │ │ │ │ +DDeeffiinniittiioonn NonlinearFactor.h:518 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_o_u_r_i_e_r_._h │ │ │ │ + * _B_a_s_i_s_F_a_c_t_o_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/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/Chebyshev.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,56 +95,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
FitBasis.h File Reference
│ │ │ +Namespaces
│ │ │ +
Chebyshev.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Chebyshev basis decompositions. │ │ │ 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...
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...
 
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::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 basis decompositions.

│ │ │ +
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │ -
Author
Varun Agrawal, Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +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 │ │ │ │ -FitBasis.h File Reference │ │ │ │ -Fit a Basis using least-squares. _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_:_:_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_._._. │ │ │ │ +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_._._. │ │ │ │ +  │ │ │ │ +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::::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 basis decompositions. │ │ │ │ + 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_._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.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,4 @@ │ │ │ │ var a00158 = [ │ │ │ │ - ["gtsam::FitBasis< Basis >", "a02744.html", "a02744"], │ │ │ │ - ["Sample", "a00158.html#a9920fe883a2f506440aca7c1a2bd1a00", null], │ │ │ │ - ["Sequence", "a00158.html#a24ec5d6ec6b211d0cbaf645c11c198de", null] │ │ │ │ + ["gtsam::Chebyshev1Basis", "a02732.html", null], │ │ │ │ + ["gtsam::Chebyshev2Basis", "a02736.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00158_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/FitBasis.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,119 +98,72 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
FitBasis.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
│ │ │
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/*
│ │ │ -
20 * Concept needed for LS. Parameters = Coefficients | Values
│ │ │ -
21 * - Parameters, Jacobian
│ │ │ -
22 * - PredictFactor(double x)(Parameters p, OptionalJacobian<1,N> H)
│ │ │ -
23 */
│ │ │ -
24
│ │ │ -
25#pragma once
│ │ │ -
26
│ │ │ -
27#include <gtsam/basis/Basis.h>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
32
│ │ │ -
33namespace gtsam {
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
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
│ │ │ -
36using Sequence = std::map<double, double>;
│ │ │ -
38using Sample = std::pair<double, double>;
│ │ │ -
39
│ │ │ -
51template <class Basis>
│ │ │ -
│ │ │ -
52class FitBasis {
│ │ │ -
53 public:
│ │ │ -
54 using Parameters = typename Basis::Parameters;
│ │ │ -
55
│ │ │ -
56 private:
│ │ │ -
57 Parameters parameters_;
│ │ │ -
58
│ │ │ -
59 public:
│ │ │ -
│ │ │ - │ │ │ -
62 const SharedNoiseModel& model,
│ │ │ -
63 size_t N) {
│ │ │ - │ │ │ -
65 for (const Sample sample : sequence) {
│ │ │ -
66 graph.emplace_shared<EvaluationFactor<Basis>>(0, sample.second, model, N,
│ │ │ -
67 sample.first);
│ │ │ -
68 }
│ │ │ -
69 return graph;
│ │ │ -
70 }
│ │ │ -
│ │ │ -
71
│ │ │ -
│ │ │ - │ │ │ -
74 const Sequence& sequence, const SharedNoiseModel& model, size_t N) {
│ │ │ -
75 NonlinearFactorGraph graph = NonlinearGraph(sequence, model, N);
│ │ │ -
76 Values values;
│ │ │ -
77 values.insert<Parameters>(0, Parameters::Zero(N));
│ │ │ -
78 GaussianFactorGraph::shared_ptr gfg = graph.linearize(values);
│ │ │ -
79 return gfg;
│ │ │ -
80 }
│ │ │ -
│ │ │ -
81
│ │ │ -
│ │ │ -
89 FitBasis(const Sequence& sequence, const SharedNoiseModel& model, size_t N) {
│ │ │ -
90 GaussianFactorGraph::shared_ptr gfg = LinearGraph(sequence, model, N);
│ │ │ -
91 VectorValues solution = gfg->optimize();
│ │ │ -
92 parameters_ = solution.at(0);
│ │ │ -
93 }
│ │ │ -
│ │ │ -
94
│ │ │ -
96 Parameters parameters() const { return parameters_; }
│ │ │ -
97};
│ │ │ -
│ │ │ -
98
│ │ │ -
99} // namespace gtsam
│ │ │ -
Factor definitions for various Basis functors.
│ │ │ -
Compute an interpolating basis.
│ │ │ -
Factor Graph Values.
│ │ │ -
Linear Factor Graph where all factors are Gaussians.
│ │ │ -
Factor Graph consisting of non-linear factors.
│ │ │ +
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
│ │ │ +
│ │ │ +
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
│ │ │ -
std::map< double, double > Sequence
Our sequence representation is a map of {x: y} values where y = f(x)
Definition FitBasis.h:36
│ │ │ -
std::pair< double, double > Sample
A sample is a key-value pair from a sequence.
Definition FitBasis.h:38
│ │ │ -
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:724
│ │ │ -
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition BasisFactors.h:39
│ │ │ -
Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebysh...
Definition FitBasis.h:52
│ │ │ -
static NonlinearFactorGraph NonlinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create nonlinear FG from Sequence.
Definition FitBasis.h:61
│ │ │ -
Parameters parameters() const
Return Fourier coefficients.
Definition FitBasis.h:96
│ │ │ -
FitBasis(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Construct a new FitBasis object.
Definition FitBasis.h:89
│ │ │ -
static GaussianFactorGraph::shared_ptr LinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create linear FG from Sequence.
Definition FitBasis.h:73
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition GaussianFactorGraph.h:81
│ │ │ -
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ -
Vector & at(Key j)
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist,...
Definition VectorValues.h:139
│ │ │ -
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
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,157 +1,71 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -FitBasis.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 │ │ │ │ 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/* │ │ │ │ -20 * Concept needed for LS. Parameters = Coefficients | Values │ │ │ │ -21 * - Parameters, Jacobian │ │ │ │ -22 * - PredictFactor(double x)(Parameters p, OptionalJacobian<1,N> H) │ │ │ │ -23 */ │ │ │ │ -24 │ │ │ │ -25#pragma once │ │ │ │ -26 │ │ │ │ -27#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_F_a_c_t_o_r_s_._h> │ │ │ │ -29#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -30#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> │ │ │ │ -31#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> │ │ │ │ -32 │ │ │ │ -33namespace _g_t_s_a_m { │ │ │ │ +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 { │ │ │ │ +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 │ │ │ │ -_3_6using _S_e_q_u_e_n_c_e = std::map; │ │ │ │ -_3_8using _S_a_m_p_l_e = std::pair; │ │ │ │ -39 │ │ │ │ -51template │ │ │ │ -_5_2class _F_i_t_B_a_s_i_s { │ │ │ │ -53 public: │ │ │ │ -54 using Parameters = typename Basis::Parameters; │ │ │ │ -55 │ │ │ │ -56 private: │ │ │ │ -57 Parameters parameters_; │ │ │ │ -58 │ │ │ │ -59 public: │ │ │ │ -_6_1 static _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h _N_o_n_l_i_n_e_a_r_G_r_a_p_h(const _S_e_q_u_e_n_c_e& sequence, │ │ │ │ -62 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, │ │ │ │ -63 size_t N) { │ │ │ │ -64 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ -65 for (const _S_a_m_p_l_e sample : sequence) { │ │ │ │ -66 graph.emplace_shared<_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_B_a_s_i_s_>>(0, sample.second, model, N, │ │ │ │ -67 sample.first); │ │ │ │ -68 } │ │ │ │ -69 return graph; │ │ │ │ -70 } │ │ │ │ -71 │ │ │ │ -_7_3 static _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r _L_i_n_e_a_r_G_r_a_p_h( │ │ │ │ -74 const _S_e_q_u_e_n_c_e& sequence, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, size_t N) { │ │ │ │ -75 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph = _N_o_n_l_i_n_e_a_r_G_r_a_p_h(sequence, model, N); │ │ │ │ -76 _V_a_l_u_e_s values; │ │ │ │ -77 values._i_n_s_e_r_t(0, Parameters::Zero(N)); │ │ │ │ -78 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r gfg = graph.linearize(values); │ │ │ │ -79 return gfg; │ │ │ │ -80 } │ │ │ │ -81 │ │ │ │ -_8_9 _F_i_t_B_a_s_i_s(const _S_e_q_u_e_n_c_e& sequence, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, size_t N) │ │ │ │ -{ │ │ │ │ -90 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r gfg = _L_i_n_e_a_r_G_r_a_p_h(sequence, model, N); │ │ │ │ -91 _V_e_c_t_o_r_V_a_l_u_e_s solution = gfg->optimize(); │ │ │ │ -92 parameters_ = solution._a_t(0); │ │ │ │ -93 } │ │ │ │ -94 │ │ │ │ -_9_6 Parameters _p_a_r_a_m_e_t_e_r_s() const { return parameters_; } │ │ │ │ -97}; │ │ │ │ -98 │ │ │ │ -99} // namespace gtsam │ │ │ │ -_B_a_s_i_s_F_a_c_t_o_r_s_._h │ │ │ │ -Factor definitions for various Basis functors. │ │ │ │ +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 │ │ │ │ +_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. │ │ │ │ -_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ -Factor Graph Values. │ │ │ │ -_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Linear Factor Graph where all factors are Gaussians. │ │ │ │ -_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_:_:_S_e_q_u_e_n_c_e │ │ │ │ -std::map< double, double > Sequence │ │ │ │ -Our sequence representation is a map of {x: y} values where y = f(x) │ │ │ │ -DDeeffiinniittiioonn FitBasis.h:36 │ │ │ │ -_g_t_s_a_m_:_:_S_a_m_p_l_e │ │ │ │ -std::pair< double, double > Sample │ │ │ │ -A sample is a key-value pair from a sequence. │ │ │ │ -DDeeffiinniittiioonn FitBasis.h:38 │ │ │ │ -_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_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ -Factor for enforcing the scalar value of the polynomial BASIS representation at │ │ │ │ -x is the same as the ... │ │ │ │ -DDeeffiinniittiioonn BasisFactors.h:39 │ │ │ │ -_g_t_s_a_m_:_:_F_i_t_B_a_s_i_s │ │ │ │ -Class that does regression via least squares Example usage: size_t N = 3; auto │ │ │ │ -fit = FitBasis shared_ptr │ │ │ │ -shared_ptr to this class │ │ │ │ -DDeeffiinniittiioonn GaussianFactorGraph.h:81 │ │ │ │ -_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ -VectorValues represents a collection of vector-valued variables associated each │ │ │ │ -with a unique integer... │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ -_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_a_t │ │ │ │ -Vector & at(Key j) │ │ │ │ -Read/write access to the vector value with key j, throws std::out_of_range if j │ │ │ │ -does not exist,... │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:139 │ │ │ │ -_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_:_:_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 │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _F_i_t_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/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/FitBasis.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,47 +95,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
Chebyshev2.h File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs
│ │ │ +
FitBasis.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Fit a Basis using least-squares. │ │ │ 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...
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

│ │ │ -

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
│ │ │ +

Fit a Basis using least-squares.

│ │ │
Date
July 4, 2020
│ │ │ +
Author
Varun Agrawal, Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +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 │ │ │ │ -Chebyshev2.h File Reference │ │ │ │ -Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ │ -_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_:_:_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_._._. │ │ │ │ +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 ********** │ │ │ │ -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, 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_2_._h │ │ │ │ + * _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/a00161.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ var a00161 = [ │ │ │ │ - ["gtsam::Chebyshev2", "a02740.html", null] │ │ │ │ + ["gtsam::FitBasis< Basis >", "a02744.html", "a02744"], │ │ │ │ + ["Sample", "a00161.html#a9920fe883a2f506440aca7c1a2bd1a00", null], │ │ │ │ + ["Sequence", "a00161.html#a24ec5d6ec6b211d0cbaf645c11c198de", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00161_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev2.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/FitBasis.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,122 +98,119 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Chebyshev2.h
│ │ │ +
FitBasis.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
│ │ │ -
33#pragma once
│ │ │ +
19/*
│ │ │ +
20 * Concept needed for LS. Parameters = Coefficients | Values
│ │ │ +
21 * - Parameters, Jacobian
│ │ │ +
22 * - PredictFactor(double x)(Parameters p, OptionalJacobian<1,N> H)
│ │ │ +
23 */
│ │ │ +
24
│ │ │ +
25#pragma once
│ │ │ +
26
│ │ │ +
27#include <gtsam/basis/Basis.h>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
32
│ │ │ +
33namespace gtsam {
│ │ │
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 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.
│ │ │ +
36using Sequence = std::map<double, double>;
│ │ │ +
38using Sample = std::pair<double, double>;
│ │ │ +
39
│ │ │ +
51template <class Basis>
│ │ │ +
│ │ │ +
52class FitBasis {
│ │ │ +
53 public:
│ │ │ +
54 using Parameters = typename Basis::Parameters;
│ │ │ +
55
│ │ │ +
56 private:
│ │ │ +
57 Parameters parameters_;
│ │ │ +
58
│ │ │ +
59 public:
│ │ │ +
│ │ │ + │ │ │ +
62 const SharedNoiseModel& model,
│ │ │ +
63 size_t N) {
│ │ │ + │ │ │ +
65 for (const Sample sample : sequence) {
│ │ │ +
66 graph.emplace_shared<EvaluationFactor<Basis>>(0, sample.second, model, N,
│ │ │ +
67 sample.first);
│ │ │ +
68 }
│ │ │ +
69 return graph;
│ │ │ +
70 }
│ │ │ +
│ │ │ +
71
│ │ │ +
│ │ │ + │ │ │ +
74 const Sequence& sequence, const SharedNoiseModel& model, size_t N) {
│ │ │ +
75 NonlinearFactorGraph graph = NonlinearGraph(sequence, model, N);
│ │ │ +
76 Values values;
│ │ │ +
77 values.insert<Parameters>(0, Parameters::Zero(N));
│ │ │ +
78 GaussianFactorGraph::shared_ptr gfg = graph.linearize(values);
│ │ │ +
79 return gfg;
│ │ │ +
80 }
│ │ │ +
│ │ │ +
81
│ │ │ +
│ │ │ +
89 FitBasis(const Sequence& sequence, const SharedNoiseModel& model, size_t N) {
│ │ │ +
90 GaussianFactorGraph::shared_ptr gfg = LinearGraph(sequence, model, N);
│ │ │ +
91 VectorValues solution = gfg->optimize();
│ │ │ +
92 parameters_ = solution.at(0);
│ │ │ +
93 }
│ │ │ +
│ │ │ +
94
│ │ │ +
96 Parameters parameters() const { return parameters_; }
│ │ │ +
97};
│ │ │ +
│ │ │ +
98
│ │ │ +
99} // namespace gtsam
│ │ │ +
Factor definitions for various Basis functors.
│ │ │ +
Compute an interpolating basis.
│ │ │ +
Linear Factor Graph where all factors are Gaussians.
│ │ │ +
Factor Graph Values.
│ │ │ +
Factor Graph consisting of non-linear factors.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
CRTP Base class for function bases.
Definition Basis.h:100
│ │ │ -
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
│ │ │ +
std::map< double, double > Sequence
Our sequence representation is a map of {x: y} values where y = f(x)
Definition FitBasis.h:36
│ │ │ +
std::pair< double, double > Sample
A sample is a key-value pair from a sequence.
Definition FitBasis.h:38
│ │ │ +
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:724
│ │ │ +
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition BasisFactors.h:39
│ │ │ +
Class that does regression via least squares Example usage: size_t N = 3; auto fit = FitBasis<Chebysh...
Definition FitBasis.h:52
│ │ │ +
static NonlinearFactorGraph NonlinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create nonlinear FG from Sequence.
Definition FitBasis.h:61
│ │ │ +
Parameters parameters() const
Return Fourier coefficients.
Definition FitBasis.h:96
│ │ │ +
FitBasis(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Construct a new FitBasis object.
Definition FitBasis.h:89
│ │ │ +
static GaussianFactorGraph::shared_ptr LinearGraph(const Sequence &sequence, const SharedNoiseModel &model, size_t N)
Create linear FG from Sequence.
Definition FitBasis.h:73
│ │ │ +
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition GaussianFactorGraph.h:81
│ │ │ +
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
Vector & at(Key j)
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist,...
Definition VectorValues.h:139
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,128 +1,157 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Chebyshev2.h │ │ │ │ +FitBasis.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 │ │ │ │ -33#pragma once │ │ │ │ +19/* │ │ │ │ +20 * Concept needed for LS. Parameters = Coefficients | Values │ │ │ │ +21 * - Parameters, Jacobian │ │ │ │ +22 * - PredictFactor(double x)(Parameters p, OptionalJacobian<1,N> H) │ │ │ │ +23 */ │ │ │ │ +24 │ │ │ │ +25#pragma once │ │ │ │ +26 │ │ │ │ +27#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_._h> │ │ │ │ +28#include <_g_t_s_a_m_/_b_a_s_i_s_/_B_a_s_i_s_F_a_c_t_o_r_s_._h> │ │ │ │ +29#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +30#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> │ │ │ │ +31#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> │ │ │ │ +32 │ │ │ │ +33namespace _g_t_s_a_m { │ │ │ │ 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 │ │ │ │ -_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. │ │ │ │ +_3_6using _S_e_q_u_e_n_c_e = std::map; │ │ │ │ +_3_8using _S_a_m_p_l_e = std::pair; │ │ │ │ +39 │ │ │ │ +51template │ │ │ │ +_5_2class _F_i_t_B_a_s_i_s { │ │ │ │ +53 public: │ │ │ │ +54 using Parameters = typename Basis::Parameters; │ │ │ │ +55 │ │ │ │ +56 private: │ │ │ │ +57 Parameters parameters_; │ │ │ │ +58 │ │ │ │ +59 public: │ │ │ │ +_6_1 static _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h _N_o_n_l_i_n_e_a_r_G_r_a_p_h(const _S_e_q_u_e_n_c_e& sequence, │ │ │ │ +62 const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, │ │ │ │ +63 size_t N) { │ │ │ │ +64 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph; │ │ │ │ +65 for (const _S_a_m_p_l_e sample : sequence) { │ │ │ │ +66 graph.emplace_shared<_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_B_a_s_i_s_>>(0, sample.second, model, N, │ │ │ │ +67 sample.first); │ │ │ │ +68 } │ │ │ │ +69 return graph; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +_7_3 static _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r _L_i_n_e_a_r_G_r_a_p_h( │ │ │ │ +74 const _S_e_q_u_e_n_c_e& sequence, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, size_t N) { │ │ │ │ +75 _N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h graph = _N_o_n_l_i_n_e_a_r_G_r_a_p_h(sequence, model, N); │ │ │ │ +76 _V_a_l_u_e_s values; │ │ │ │ +77 values._i_n_s_e_r_t(0, Parameters::Zero(N)); │ │ │ │ +78 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r gfg = graph.linearize(values); │ │ │ │ +79 return gfg; │ │ │ │ +80 } │ │ │ │ +81 │ │ │ │ +_8_9 _F_i_t_B_a_s_i_s(const _S_e_q_u_e_n_c_e& sequence, const _S_h_a_r_e_d_N_o_i_s_e_M_o_d_e_l& model, size_t N) │ │ │ │ +{ │ │ │ │ +90 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r gfg = _L_i_n_e_a_r_G_r_a_p_h(sequence, model, N); │ │ │ │ +91 _V_e_c_t_o_r_V_a_l_u_e_s solution = gfg->optimize(); │ │ │ │ +92 parameters_ = solution._a_t(0); │ │ │ │ +93 } │ │ │ │ +94 │ │ │ │ +_9_6 Parameters _p_a_r_a_m_e_t_e_r_s() const { return parameters_; } │ │ │ │ +97}; │ │ │ │ +98 │ │ │ │ +99} // namespace gtsam │ │ │ │ +_B_a_s_i_s_F_a_c_t_o_r_s_._h │ │ │ │ +Factor definitions for various Basis functors. │ │ │ │ _B_a_s_i_s_._h │ │ │ │ Compute an interpolating basis. │ │ │ │ +_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Linear Factor Graph where all factors are Gaussians. │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ +Factor Graph Values. │ │ │ │ +_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_:_:_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_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_:_:_S_e_q_u_e_n_c_e │ │ │ │ +std::map< double, double > Sequence │ │ │ │ +Our sequence representation is a map of {x: y} values where y = f(x) │ │ │ │ +DDeeffiinniittiioonn FitBasis.h:36 │ │ │ │ +_g_t_s_a_m_:_:_S_a_m_p_l_e │ │ │ │ +std::pair< double, double > Sample │ │ │ │ +A sample is a key-value pair from a sequence. │ │ │ │ +DDeeffiinniittiioonn FitBasis.h:38 │ │ │ │ +_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_:_:_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r │ │ │ │ +Factor for enforcing the scalar value of the polynomial BASIS representation at │ │ │ │ +x is the same as the ... │ │ │ │ +DDeeffiinniittiioonn BasisFactors.h:39 │ │ │ │ +_g_t_s_a_m_:_:_F_i_t_B_a_s_i_s │ │ │ │ +Class that does regression via least squares Example usage: size_t N = 3; auto │ │ │ │ +fit = FitBasis shared_ptr │ │ │ │ +shared_ptr to this class │ │ │ │ +DDeeffiinniittiioonn GaussianFactorGraph.h:81 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +VectorValues represents a collection of vector-valued variables associated each │ │ │ │ +with a unique integer... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_a_t │ │ │ │ +Vector & at(Key j) │ │ │ │ +Read/write access to the vector value with key j, throws std::out_of_range if j │ │ │ │ +does not exist,... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:139 │ │ │ │ +_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 │ │ │ │ * _b_a_s_i_s │ │ │ │ - * _C_h_e_b_y_s_h_e_v_2_._h │ │ │ │ + * _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/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/Basis.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,84 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
Chebyshev2.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
Basis.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::Basis< DERIVED >
 CRTP Base class for function bases. 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ 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

│ │ │ -

Chebyshev parameterizations on Chebyshev points of second kind.

│ │ │ +

Compute an interpolating basis.

│ │ │
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,71 @@ │ │ │ │ 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 | _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_:_:_B_a_s_i_s_<_ _D_E_R_I_V_E_D_ _> │ │ │ │ +  CRTP Base class for function bases. _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_._._. │ │ │ │ +  │ │ │ │ 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 ********** │ │ │ │ -Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ │ +Compute an interpolating basis. │ │ │ │ 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_._c_p_p │ │ │ │ + * _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/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/Chebyshev2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,46 +96,46 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Chebyshev.h File Reference
│ │ │ +
Chebyshev2.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Chebyshev basis decompositions. │ │ │ +

Pseudo-spectral parameterization for Chebyshev polynomials of the second kind. │ │ │ 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...
 
struct  gtsam::Chebyshev2Basis
 Basis of Chebyshev polynomials of the second kind. 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

│ │ │ -

Chebyshev basis decompositions.

│ │ │ +

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,32 +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 │ │ │ │ -Chebyshev.h File Reference │ │ │ │ -Chebyshev basis decompositions. _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 │ │ │ │ -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_._._. │ │ │ │ -  │ │ │ │ -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_._._. │ │ │ │ +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 ********** │ │ │ │ -Chebyshev basis decompositions. │ │ │ │ +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, 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_._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/a00167.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00167 = [ │ │ │ │ - ["gtsam::Chebyshev1Basis", "a02732.html", null], │ │ │ │ - ["gtsam::Chebyshev2Basis", "a02736.html", null] │ │ │ │ + ["gtsam::Chebyshev2", "a02740.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/Chebyshev2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,72 +98,122 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Chebyshev.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
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ -
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*/>;
│ │ │ +
33#pragma once
│ │ │
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
│ │ │ -
│ │ │ -
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.
│ │ │ +
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 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
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
Special class for optional Jacobian arguments.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,71 +1,128 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Chebyshev.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 │ │ │ │ -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 { │ │ │ │ -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; │ │ │ │ +33#pragma once │ │ │ │ 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 │ │ │ │ -_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 │ │ │ │ +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 │ │ │ │ +_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 │ │ │ │ _M_a_n_i_f_o_l_d_._h │ │ │ │ Base class and basic functions for Manifold types. │ │ │ │ +_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_._h │ │ │ │ +Special class for optional Jacobian arguments. │ │ │ │ _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_:_:_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_:_:_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 │ │ │ │ - * _C_h_e_b_y_s_h_e_v_._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/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/Chebyshev2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,35 +95,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
Chebyshev.cpp File Reference
│ │ │ +
Chebyshev2.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Chebyshev basis decompositions. │ │ │ +

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

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Chebyshev basis decompositions.

│ │ │ +

Chebyshev parameterizations on Chebyshev points of second kind.

│ │ │
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ 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_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Chebyshev basis decompositions. │ │ │ │ +Chebyshev parameterizations on Chebyshev points of second kind. │ │ │ │ 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_._c_p_p │ │ │ │ + * _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/a00173.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/BasisFactors.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/basis/Chebyshev.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,63 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
BasisFactors.h File Reference
│ │ │ +
Chebyshev.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Factor definitions for various Basis functors. │ │ │ +

Chebyshev basis decompositions. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::EvaluationFactor< BASIS >
 Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the measurement z when using a pseudo-spectral parameterization. More...
 
class  gtsam::VectorEvaluationFactor< BASIS, M >
 Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (M, N) is equal to a vector-valued measurement at the same point, when using a pseudo-spectral parameterization. More...
 
class  gtsam::VectorComponentFactor< BASIS, P >
 Unary factor for enforcing BASIS polynomial evaluation on a ParameterMatrix of size (P, N) is equal to specified measurement at the same point, when using a pseudo-spectral parameterization. More...
 
class  gtsam::ManifoldEvaluationFactor< BASIS, T >
 For a measurement value of type T i.e. More...
 
class  gtsam::DerivativeFactor< BASIS >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified pointx is equal to the scalar measurement z. More...
 
class  gtsam::VectorDerivativeFactor< BASIS, M >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial at a specified point x is equal to the vector value z. More...
 
class  gtsam::ComponentDerivativeFactor< BASIS, P >
 A unary factor which enforces the evaluation of the derivative of a BASIS polynomial is equal to the scalar value at a specific index i of a vector-valued measurement z. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Factor definitions for various Basis functors.

│ │ │ -
Author
Varun Agrawal
│ │ │ +

Chebyshev basis decompositions.

│ │ │ +
Author
Varun Agrawal, Jing Dong, Frank Dellaert
│ │ │
Date
July 4, 2020
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,58 +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 │ │ │ │ -BasisFactors.h File Reference │ │ │ │ -Factor definitions for various Basis functors. _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_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_ _> │ │ │ │ - _F_a_c_t_o_r for enforcing the scalar value of the polynomial BASIS │ │ │ │ -  representation at x is the same as the measurement z when using a │ │ │ │ - pseudo-spectral parameterization. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_V_e_c_t_o_r_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _M_ _> │ │ │ │ - Unary factor for enforcing BASIS polynomial evaluation on a │ │ │ │ -  _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x of size (M, N) is equal to a vector-valued measurement │ │ │ │ - at the same point, when using a pseudo-spectral parameterization. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_V_e_c_t_o_r_C_o_m_p_o_n_e_n_t_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _P_ _> │ │ │ │ - Unary factor for enforcing BASIS polynomial evaluation on a │ │ │ │ -  _P_a_r_a_m_e_t_e_r_M_a_t_r_i_x of size (P, N) is equal to specified measurement at the │ │ │ │ - same point, when using a pseudo-spectral parameterization. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_M_a_n_i_f_o_l_d_E_v_a_l_u_a_t_i_o_n_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _T_ _> │ │ │ │ -  For a measurement value of type T i.e. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_ _> │ │ │ │ - A unary factor which enforces the evaluation of the derivative of a │ │ │ │ -  BASIS polynomial at a specified pointx is equal to the scalar │ │ │ │ - measurement z. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_V_e_c_t_o_r_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _M_ _> │ │ │ │ - A unary factor which enforces the evaluation of the derivative of a │ │ │ │ -  BASIS polynomial at a specified point x is equal to the vector value z. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_C_o_m_p_o_n_e_n_t_D_e_r_i_v_a_t_i_v_e_F_a_c_t_o_r_<_ _B_A_S_I_S_,_ _P_ _> │ │ │ │ - A unary factor which enforces the evaluation of the derivative of a │ │ │ │ -  BASIS polynomial is equal to the scalar value at a specific index i of │ │ │ │ - a vector-valued measurement z. _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 ********** │ │ │ │ -Factor definitions for various Basis functors. │ │ │ │ +Chebyshev basis decompositions. │ │ │ │ Author │ │ │ │ - Varun Agrawal │ │ │ │ + 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_F_a_c_t_o_r_s_._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/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/ParameterMatrix.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,82 +96,53 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
Basis.h File Reference
│ │ │ +
ParameterMatrix.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Compute an interpolating basis. │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::Basis< DERIVED >
 CRTP Base class for function bases. More...
class  gtsam::ParameterMatrix< M >
 A matrix abstraction of MxN values at the Basis points. 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::traits< ParameterMatrix< M > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ 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.
 
│ │ │ +template<int M>
std::ostream & gtsam::operator<< (std::ostream &os, const ParameterMatrix< M > &parameterMatrix)
 
│ │ │

Detailed Description

│ │ │ -

Compute an interpolating basis.

│ │ │ -
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,71 +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 | _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 | _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 │ │ │ │ -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_._._. │ │ │ │ + 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_ _>_:_:_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_:_:_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. │ │ │ │   │ │ │ │ -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. │ │ │ │ +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 ********** │ │ │ │ -Compute an interpolating basis. │ │ │ │ +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 │ │ │ │ - * _B_a_s_i_s_._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/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::ParameterMatrix< M >", "a02752.html", "a02752"], │ │ │ │ + ["gtsam::traits< ParameterMatrix< M > >", "a02756.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/ParameterMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,473 +98,208 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Basis.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/Matrix.h>
│ │ │ - │ │ │ - │ │ │ -
24
│ │ │ -
25#include <iostream>
│ │ │ -
26
│ │ │ -
68namespace gtsam {
│ │ │ +
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_; }
│ │ │
69
│ │ │ -
70using Weights = Eigen::Matrix<double, 1, -1>; /* 1xN vector */
│ │ │ -
71
│ │ │ -
84template <size_t M>
│ │ │ +
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
│ │ │
│ │ │ -
85Matrix kroneckerProductIdentity(const Weights& w) {
│ │ │ -
86 Matrix result(M, w.cols() * M);
│ │ │ -
87 result.setZero();
│ │ │ +
85 auto row(size_t index) -> Eigen::Block<MatrixType, 1, -1, false> {
│ │ │ +
86 return matrix_.row(index);
│ │ │ +
87 }
│ │ │ +
│ │ │
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
│ │ │ +
│ │ │ +
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
│ │ │
│ │ │ - │ │ │ -
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
│ │ │ +
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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,554 +1,252 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Basis.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_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 { │ │ │ │ +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_; } │ │ │ │ 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(); │ │ │ │ +_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 │ │ │ │ -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. │ │ │ │ +_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 │ │ │ │ -_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 │ │ │ │ +_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_:_:_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_:_:_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_:_:_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 │ │ │ │ - * _B_a_s_i_s_._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/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/DiscreteBayesNet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,60 +95,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Signature.h File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteBayesNet.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...
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -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

│ │ │ -
Author
Frank Dellaert
│ │ │ -
Date
Feb 27, 2011
│ │ │ +
Date
Feb 15, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +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 | _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 │ │ │ │ +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_:_:_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_:_:_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. │ │ │ │   │ │ │ │ -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 │ │ │ │ - Author │ │ │ │ - Frank Dellaert │ │ │ │ Date │ │ │ │ - Feb 27, 2011 │ │ │ │ + Feb 15, 2011 │ │ │ │ + Author │ │ │ │ + Duy-Nguyen Ta │ │ │ │ + Frank dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _S_i_g_n_a_t_u_r_e_._h │ │ │ │ + * _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/a00179.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,3 @@ │ │ │ │ var a00179 = [ │ │ │ │ - ["operator%", "a00179.html#ae4856250df52ce4b9b4b16c7a833408c", null], │ │ │ │ - ["operator%", "a00179.html#ab98cf2a4777006c28d6983db5d8ec574", null], │ │ │ │ - ["operator|", "a00179.html#aa6c58dfb2fc9398a026e3268ba2edfad", null] │ │ │ │ + ["gtsam::traits< DiscreteBayesNet >", "a02820.html", null] │ │ │ │ ]; │ │ ├── ./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/DiscreteBayesNet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,112 +98,173 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Signature.h
│ │ │ +
DiscreteBayesNet.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;
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
25
│ │ │ +
26#include <boost/shared_ptr.hpp>
│ │ │ +
27#include <map>
│ │ │ +
28#include <string>
│ │ │ +
29#include <utility>
│ │ │ +
30#include <vector>
│ │ │ +
31
│ │ │ +
32namespace gtsam {
│ │ │ +
33
│ │ │ +
│ │ │ +
38class GTSAM_EXPORT DiscreteBayesNet: public BayesNet<DiscreteConditional> {
│ │ │ +
39 public:
│ │ │ + │ │ │ +
41 typedef DiscreteBayesNet This;
│ │ │ + │ │ │ +
43 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
44 typedef boost::shared_ptr<ConditionalType> sharedConditional;
│ │ │ +
45
│ │ │ +
48
│ │ │ + │ │ │ +
51
│ │ │ +
53 template <typename ITERATOR>
│ │ │ +
│ │ │ +
54 DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
│ │ │ +
55 : Base(firstConditional, lastConditional) {}
│ │ │ +
│ │ │ +
56
│ │ │ +
58 template <class CONTAINER>
│ │ │ +
│ │ │ +
59 explicit DiscreteBayesNet(const CONTAINER& conditionals)
│ │ │ +
60 : Base(conditionals) {}
│ │ │ +
│ │ │
61
│ │ │ -
62 private:
│ │ │ -
63
│ │ │ -
65 DiscreteKey key_;
│ │ │ -
66
│ │ │ -
68 DiscreteKeys parents_;
│ │ │ -
69
│ │ │ -
70 // the given CPT specification string
│ │ │ -
71 boost::optional<std::string> spec_;
│ │ │ +
64 template <class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
66 : Base(graph) {}
│ │ │ +
│ │ │ +
67
│ │ │ +
69 virtual ~DiscreteBayesNet() {}
│ │ │ +
70
│ │ │
72
│ │ │ -
73 // the CPT as parsed, if successful
│ │ │ -
74 boost::optional<Table> table_;
│ │ │
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_; }
│ │ │ +
77 bool equals(const This& bn, double tol = 1e-9) const;
│ │ │ +
78
│ │ │ +
80
│ │ │ +
83
│ │ │ +
84 // Add inherited versions of add.
│ │ │ +
85 using Base::add;
│ │ │ +
86
│ │ │ +
│ │ │ +
88 void add(const DiscreteKey& key, const std::string& spec) {
│ │ │ +
89 emplace_shared<DiscreteDistribution>(key, spec);
│ │ │ +
90 }
│ │ │ +
│ │ │ +
91
│ │ │ +
93 template <typename... Args>
│ │ │ +
│ │ │ +
94 void add(Args&&... args) {
│ │ │ +
95 emplace_shared<DiscreteConditional>(std::forward<Args>(args)...);
│ │ │ +
96 }
│ │ │ +
│ │ │ +
97
│ │ │ +
98 //** evaluate for given DiscreteValues */
│ │ │ +
99 double evaluate(const DiscreteValues & values) const;
│ │ │ +
100
│ │ │ +
101 //** (Preferred) sugar for the above for given DiscreteValues */
│ │ │ +
102 double operator()(const DiscreteValues & values) const {
│ │ │ +
103 return evaluate(values);
│ │ │ +
104 }
│ │ │ +
105
│ │ │ +
106 //** log(evaluate(values)) for given DiscreteValues */
│ │ │ +
107 double logProbability(const DiscreteValues & values) const;
│ │ │ +
108
│ │ │ +
118 DiscreteValues sample() const;
│ │ │
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);
│ │ │ +
128 DiscreteValues sample(DiscreteValues given) const;
│ │ │ +
129
│ │ │ +
133
│ │ │ +
135 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
136 const DiscreteFactor::Names& names = {}) const;
│ │ │
137
│ │ │ -
139 Signature& operator=(const Table& table);
│ │ │ -
140
│ │ │ -
142 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
143 const Signature& s);
│ │ │ -
144 };
│ │ │ -
│ │ │ +
139 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
140 const DiscreteFactor::Names& names = {}) const;
│ │ │ +
141
│ │ │
145
│ │ │ -
150 GTSAM_EXPORT Signature operator|(const DiscreteKey& key, const DiscreteKey& parent);
│ │ │ +
146 using Base::error; // Expose error(const HybridValues&) method..
│ │ │ +
147 using Base::evaluate; // Expose evaluate(const HybridValues&) method..
│ │ │ +
148 using Base::logProbability; // Expose logProbability(const HybridValues&)
│ │ │ +
149
│ │ │
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
│ │ │ +
152#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ +
155
│ │ │ +
156 DiscreteValues GTSAM_DEPRECATED optimize() const;
│ │ │ +
157 DiscreteValues GTSAM_DEPRECATED optimize(DiscreteValues given) const;
│ │ │ +
159#endif
│ │ │ +
160
│ │ │ +
161 private:
│ │ │ +
163 friend class boost::serialization::access;
│ │ │ +
164 template<class ARCHIVE>
│ │ │ +
165 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
166 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
167 }
│ │ │ +
168 };
│ │ │ +
│ │ │ +
169
│ │ │ +
170// traits
│ │ │ +
171template<> struct traits<DiscreteBayesNet> : public Testable<DiscreteBayesNet> {};
│ │ │ +
172
│ │ │ +
173} // \ namespace gtsam
│ │ │ +
174
│ │ │ + │ │ │ + │ │ │ +
Bayes network.
│ │ │ +
Factor Graph Base Class.
│ │ │
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
│ │ │ +
string html(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of html.
Definition DiscreteValues.cpp:134
│ │ │ +
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │ +
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
│ │ │ +
A Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
│ │ │ +
DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
Construct from iterator over conditionals.
Definition DiscreteBayesNet.h:54
│ │ │ +
DiscreteBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition DiscreteBayesNet.h:65
│ │ │ +
DiscreteBayesNet(const CONTAINER &conditionals)
Construct from container of factors (shared_ptr or plain objects)
Definition DiscreteBayesNet.h:59
│ │ │ +
DiscreteBayesNet()
Construct empty Bayes net.
Definition DiscreteBayesNet.h:50
│ │ │ +
virtual ~DiscreteBayesNet()
Destructor.
Definition DiscreteBayesNet.h:69
│ │ │ +
void add(Args &&... args)
Add a DiscreteCondtional.
Definition DiscreteBayesNet.h:94
│ │ │ +
void add(const DiscreteKey &key, const std::string &spec)
Add a DiscreteDistribution using a table or a string.
Definition DiscreteBayesNet.h:88
│ │ │ +
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ +
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ +
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ +
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
The Factor::error simply extracts the.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Signature.h │ │ │ │ +DiscreteBayesNet.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,197 @@ │ │ │ │ 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; │ │ │ │ +20 │ │ │ │ +21#include <_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> │ │ │ │ +22#include <_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> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31 │ │ │ │ +32namespace _g_t_s_a_m { │ │ │ │ +33 │ │ │ │ +_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t: public _B_a_y_e_s_N_e_t { │ │ │ │ +39 public: │ │ │ │ +40 typedef _B_a_y_e_s_N_e_t_<_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_> _B_a_s_e; │ │ │ │ +41 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t _T_h_i_s; │ │ │ │ +42 typedef _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e; │ │ │ │ +43 typedef boost::shared_ptr shared_ptr; │ │ │ │ +44 typedef boost::shared_ptr sharedConditional; │ │ │ │ +45 │ │ │ │ +48 │ │ │ │ +_5_0 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t() {} │ │ │ │ +51 │ │ │ │ +53 template │ │ │ │ +_5_4 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(ITERATOR firstConditional, ITERATOR lastConditional) │ │ │ │ +55 : _B_a_s_e(firstConditional, lastConditional) {} │ │ │ │ +56 │ │ │ │ +58 template │ │ │ │ +_5_9 explicit _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(const CONTAINER& conditionals) │ │ │ │ +60 : _B_a_s_e(conditionals) {} │ │ │ │ 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_; │ │ │ │ +64 template │ │ │ │ +_6_5 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(const _F_a_c_t_o_r_G_r_a_p_h_<_D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>& graph) │ │ │ │ +66 : _B_a_s_e(graph) {} │ │ │ │ +67 │ │ │ │ +_6_9 virtual _~_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t() {} │ │ │ │ +70 │ │ │ │ 72 │ │ │ │ -73 // the CPT as parsed, if successful │ │ │ │ -74 boost::optional table_; │ │ │ │ 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_; } │ │ │ │ +77 bool _e_q_u_a_l_s(const This& bn, double tol = 1e-9) const; │ │ │ │ +78 │ │ │ │ +80 │ │ │ │ +83 │ │ │ │ +84 // Add inherited versions of add. │ │ │ │ +85 using Base::add; │ │ │ │ +86 │ │ │ │ +_8_8 void _a_d_d(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) { │ │ │ │ +89 emplace_shared(key, spec); │ │ │ │ +90 } │ │ │ │ +91 │ │ │ │ +93 template │ │ │ │ +_9_4 void _a_d_d(Args&&... args) { │ │ │ │ +95 emplace_shared(std::forward(args)...); │ │ │ │ +96 } │ │ │ │ +97 │ │ │ │ +98 //** evaluate for given DiscreteValues */ │ │ │ │ +99 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const; │ │ │ │ +100 │ │ │ │ +101 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ +102 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const { │ │ │ │ +103 return evaluate(values); │ │ │ │ +104 } │ │ │ │ +105 │ │ │ │ +106 //** log(evaluate(values)) for given DiscreteValues */ │ │ │ │ +107 double logProbability(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const; │ │ │ │ +108 │ │ │ │ +118 _D_i_s_c_r_e_t_e_V_a_l_u_e_s sample() const; │ │ │ │ 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); │ │ │ │ +128 _D_i_s_c_r_e_t_e_V_a_l_u_e_s sample(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given) const; │ │ │ │ +129 │ │ │ │ +133 │ │ │ │ +135 std::string markdown(const KeyFormatter& keyFormatter = │ │ │ │ +DefaultKeyFormatter, │ │ │ │ +136 const DiscreteFactor::Names& names = {}) const; │ │ │ │ 137 │ │ │ │ -139 Signature& operator=(const Table& table); │ │ │ │ -140 │ │ │ │ -142 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -143 const Signature& s); │ │ │ │ -144 }; │ │ │ │ +139 std::string _h_t_m_l(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ +140 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +141 │ │ │ │ 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); │ │ │ │ +146 using Base::error; // Expose error(const HybridValues&) method.. │ │ │ │ +147 using Base::evaluate; // Expose evaluate(const HybridValues&) method.. │ │ │ │ +148 using Base::logProbability; // Expose logProbability(const HybridValues&) │ │ │ │ +149 │ │ │ │ 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 │ │ │ │ +152#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ +155 │ │ │ │ +156 _D_i_s_c_r_e_t_e_V_a_l_u_e_s GTSAM_DEPRECATED _o_p_t_i_m_i_z_e() const; │ │ │ │ +157 _D_i_s_c_r_e_t_e_V_a_l_u_e_s GTSAM_DEPRECATED _o_p_t_i_m_i_z_e(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given) const; │ │ │ │ +159#endif │ │ │ │ +160 │ │ │ │ +161 private: │ │ │ │ +_1_6_3 friend class boost::serialization::access; │ │ │ │ +164 template │ │ │ │ +165 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +166 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ +167 } │ │ │ │ +168 }; │ │ │ │ +169 │ │ │ │ +170// traits │ │ │ │ +_1_7_1template<> struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t> : public │ │ │ │ +_T_e_s_t_a_b_l_e {}; │ │ │ │ +172 │ │ │ │ +173} // \ namespace gtsam │ │ │ │ +174 │ │ │ │ +_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_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ +_B_a_y_e_s_N_e_t_._h │ │ │ │ +Bayes network. │ │ │ │ +_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor Graph Base Class. │ │ │ │ _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_:_:_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_:_:_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_:_:_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_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +A Bayes net made from discrete conditional distributions. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:38 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional) │ │ │ │ +Construct from iterator over conditionals. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:54 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +DiscreteBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph) │ │ │ │ +Implicit copy/downcast constructor to override explicit template container │ │ │ │ +constructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:65 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +DiscreteBayesNet(const CONTAINER &conditionals) │ │ │ │ +Construct from container of factors (shared_ptr or plain objects) │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:59 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +DiscreteBayesNet() │ │ │ │ +Construct empty Bayes net. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:50 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_~_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +virtual ~DiscreteBayesNet() │ │ │ │ +Destructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:69 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_a_d_d │ │ │ │ +void add(Args &&... args) │ │ │ │ +Add a DiscreteCondtional. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:94 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_a_d_d │ │ │ │ +void add(const DiscreteKey &key, const std::string &spec) │ │ │ │ +Add a DiscreteDistribution using a table or a string. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:88 │ │ │ │ +_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_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_N_e_t │ │ │ │ +A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ +DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ +nodes. │ │ │ │ +DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_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 │ │ │ │ - * _S_i_g_n_a_t_u_r_e_._h │ │ │ │ + * _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/a00182.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Signature.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,84 +94,61 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
Signature.cpp File Reference
│ │ │ +Functions
│ │ │ +
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -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

│ │ │

signatures for conditional densities

│ │ │
Author
Frank Dellaert
│ │ │
Date
Feb 27, 2011
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,57 +1,42 @@ │ │ │ │ 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 | _V_a_r_i_a_b_l_e_s │ │ │ │ -Signature.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. │ │ │ │   │ │ │ │ -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 │ │ │ │ +_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 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ Feb 27, 2011 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _d_i_s_c_r_e_t_e │ │ │ │ - * _S_i_g_n_a_t_u_r_e_._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/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/DiscreteBayesNet.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,59 +94,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteValues.h File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteBayesNet.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.
 
│ │ │

Detailed Description

│ │ │ -
Date
Dec 13, 2021
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 15, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,43 +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 | _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 │ │ │ │ +DiscreteBayesNet.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. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Dec 13, 2021 │ │ │ │ + Feb 15, 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_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/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/DiscreteConditional.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,43 +95,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteValues.cpp File Reference
│ │ │ +Variables
│ │ │ +
DiscreteConditional.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ 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.
 

│ │ │ +Variables

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

Detailed Description

│ │ │ -
Date
January, 2022
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,25 @@ │ │ │ │ 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 │ │ │ │ +_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. │ │ │ │   │ │ │ │ -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. │ │ │ │ -  │ │ │ │ -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. │ │ │ │ +VVaarriiaabblleess │ │ │ │ +template class GTSAM_EXPORT  ggttssaamm::::CCoonnddiittiioonnaall<< DDeecciissiioonnTTrreeeeFFaaccttoorr,, │ │ │ │ + DDiissccrreetteeCCoonnddiittiioonnaall >> │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - January, 2022 │ │ │ │ + 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_._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/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/DiscreteFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,48 +95,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
DiscreteMarginals.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
DiscreteFactor.h 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...
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

│ │ │ -

A class for computing marginals in a DiscreteFactorGraph.

│ │ │ -
Author
Abhijit Kundu
│ │ │ -
│ │ │ -Richard Roberts
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │
│ │ │ Frank Dellaert
│ │ │ -
Date
June 4, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +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 │ │ │ │ -DiscreteMarginals.h File Reference │ │ │ │ -A class for computing marginals in a DiscreteFactorGraph. _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 │ │ │ │ +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_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_._._. │ │ │ │ + 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 ********** │ │ │ │ -A class for computing marginals in a DiscreteFactorGraph. │ │ │ │ + Date │ │ │ │ + Feb 14, 2011 │ │ │ │ Author │ │ │ │ - Abhijit Kundu │ │ │ │ - Richard Roberts │ │ │ │ + Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - June 4, 2012 │ │ │ │ * _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_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/a00191_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteMarginals.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,101 +98,143 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteMarginals.h
│ │ │ +
DiscreteFactor.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
│ │ │ - │ │ │ - │ │ │ -
25#include <gtsam/base/Vector.h>
│ │ │ -
26
│ │ │ -
27namespace gtsam {
│ │ │ -
28
│ │ │ -
│ │ │ - │ │ │ -
34
│ │ │ -
35 protected:
│ │ │ -
36
│ │ │ -
37 DiscreteBayesTree::shared_ptr bayesTree_;
│ │ │ -
38
│ │ │ -
39 public:
│ │ │ -
40
│ │ │ - │ │ │ -
42
│ │ │ -
│ │ │ - │ │ │ -
47 bayesTree_ = graph.eliminateMultifrontal();
│ │ │ -
48 }
│ │ │ -
│ │ │ -
49
│ │ │ -
│ │ │ - │ │ │ -
52 // Compute marginal
│ │ │ -
53 DiscreteFactor::shared_ptr marginalFactor;
│ │ │ -
54 marginalFactor = bayesTree_->marginalFactor(variable, &EliminateDiscrete);
│ │ │ -
55 return marginalFactor;
│ │ │ -
56 }
│ │ │ -
│ │ │ -
57
│ │ │ -
│ │ │ -
62 Vector marginalProbabilities(const DiscreteKey& key) const {
│ │ │ -
63 // Compute marginal
│ │ │ -
64 DiscreteFactor::shared_ptr marginalFactor;
│ │ │ -
65 marginalFactor = bayesTree_->marginalFactor(key.first, &EliminateDiscrete);
│ │ │ -
66
│ │ │ -
67 //Create result
│ │ │ -
68 Vector vResult(key.second);
│ │ │ -
69 for (size_t state = 0; state < key.second ; ++ state) {
│ │ │ -
70 DiscreteValues values;
│ │ │ -
71 values[key.first] = state;
│ │ │ -
72 vResult(state) = (*marginalFactor)(values);
│ │ │ -
73 }
│ │ │ -
74 return vResult;
│ │ │ -
75 }
│ │ │ -
│ │ │ -
76
│ │ │ -
77 };
│ │ │ -
│ │ │ -
78
│ │ │ -
79} /* namespace gtsam */
│ │ │ -
typedef and functions to augment Eigen's VectorXd
│ │ │ - │ │ │ -
Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.
│ │ │ -
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for DiscreteFactorGraph.
Definition DiscreteFactorGraph.cpp:200
│ │ │ -
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │ +
24
│ │ │ +
25#include <string>
│ │ │ +
26namespace gtsam {
│ │ │ +
27
│ │ │ +
28class DecisionTreeFactor;
│ │ │ +
29class DiscreteConditional;
│ │ │ +
30class HybridValues;
│ │ │ +
31
│ │ │ +
│ │ │ +
38class GTSAM_EXPORT DiscreteFactor: public Factor {
│ │ │ +
39
│ │ │ +
40public:
│ │ │ +
41
│ │ │ +
42 // typedefs needed to play nice with gtsam
│ │ │ + │ │ │ +
44 typedef boost::shared_ptr<DiscreteFactor> shared_ptr;
│ │ │ +
45 typedef Factor Base;
│ │ │ +
46
│ │ │ + │ │ │ +
48
│ │ │ +
49public:
│ │ │ +
50
│ │ │ +
53
│ │ │ + │ │ │ +
56
│ │ │ +
59 template<typename CONTAINER>
│ │ │ +
60 DiscreteFactor(const CONTAINER& keys) : Base(keys) {}
│ │ │ +
61
│ │ │ +
│ │ │ +
63 virtual ~DiscreteFactor() {
│ │ │ +
64 }
│ │ │ +
│ │ │ +
65
│ │ │ +
69
│ │ │ +
71 virtual bool equals(const DiscreteFactor& lf, double tol = 1e-9) const = 0;
│ │ │ +
72
│ │ │ +
│ │ │ +
74 void print(
│ │ │ +
75 const std::string& s = "DiscreteFactor\n",
│ │ │ +
76 const KeyFormatter& formatter = DefaultKeyFormatter) const override {
│ │ │ +
77 Base::print(s, formatter);
│ │ │ +
78 }
│ │ │ +
│ │ │ +
79
│ │ │ +
83
│ │ │ +
85 virtual double operator()(const DiscreteValues&) const = 0;
│ │ │ +
86
│ │ │ +
88 double error(const DiscreteValues& values) const;
│ │ │ +
89
│ │ │ +
94 double error(const HybridValues& c) const override;
│ │ │ +
95
│ │ │ + │ │ │ +
98
│ │ │ +
99 virtual DecisionTreeFactor toDecisionTreeFactor() const = 0;
│ │ │ +
100
│ │ │ +
104
│ │ │ + │ │ │ +
107
│ │ │ +
115 virtual std::string markdown(
│ │ │ +
116 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
117 const Names& names = {}) const = 0;
│ │ │ +
118
│ │ │ +
126 virtual std::string html(
│ │ │ +
127 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
128 const Names& names = {}) const = 0;
│ │ │ +
129
│ │ │ +
131};
│ │ │ +
│ │ │ +
132// DiscreteFactor
│ │ │ +
133
│ │ │ +
134// traits
│ │ │ +
135template<> struct traits<DiscreteFactor> : public Testable<DiscreteFactor> {};
│ │ │ +
136
│ │ │ +
137
│ │ │ +
154std::vector<double> expNormalize(const std::vector<double> &logProbs);
│ │ │ +
155
│ │ │ +
156
│ │ │ +
157}// namespace gtsam
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ + │ │ │ +
The base class for all factors.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │ +
std::vector< double > expNormalize(const std::vector< double > &logProbs)
Normalize a set of log probabilities.
Definition DiscreteFactor.cpp:42
│ │ │ +
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
│ │ │ +
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition DiscreteFactor.h:38
│ │ │ +
virtual std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0
Render as html table.
│ │ │ +
Factor Base
Our base class.
Definition DiscreteFactor.h:45
│ │ │ +
void print(const std::string &s="DiscreteFactor\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Definition DiscreteFactor.h:74
│ │ │
boost::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
Definition DiscreteFactor.h:44
│ │ │ -
A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
Definition DiscreteFactorGraph.h:101
│ │ │ -
A class for computing marginals of variables in a DiscreteFactorGraph.
Definition DiscreteMarginals.h:33
│ │ │ -
Vector marginalProbabilities(const DiscreteKey &key) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.h:62
│ │ │ -
DiscreteMarginals(const DiscreteFactorGraph &graph)
Construct a marginals class.
Definition DiscreteMarginals.h:46
│ │ │ -
DiscreteFactor::shared_ptr operator()(Key variable) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.h:51
│ │ │ +
virtual ~DiscreteFactor()
Virtual destructor.
Definition DiscreteFactor.h:63
│ │ │ +
DiscreteValues::Names Names
Translation table from values to strings.
Definition DiscreteFactor.h:106
│ │ │ +
virtual bool equals(const DiscreteFactor &lf, double tol=1e-9) const =0
equals
│ │ │ +
DiscreteFactor This
This class.
Definition DiscreteFactor.h:43
│ │ │ +
virtual DecisionTreeFactor operator*(const DecisionTreeFactor &) const =0
Multiply in a DecisionTreeFactor and return the result as DecisionTreeFactor.
│ │ │ +
virtual double operator()(const DiscreteValues &) const =0
Find value for given assignment of values to variables.
│ │ │ +
virtual std::string markdown(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0
Render as markdown table.
│ │ │ +
DiscreteFactor(const CONTAINER &keys)
Construct from container of keys.
Definition DiscreteFactor.h:60
│ │ │ +
DiscreteFactor()
Default constructor creates empty factor.
Definition DiscreteFactor.h:55
│ │ │
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ +
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
Definition DiscreteValues.h:95
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
Definition Factor.h:68
│ │ │ +
the error.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,118 +1,196 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteMarginals.h │ │ │ │ +DiscreteFactor.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_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 │ │ │ │ -_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 │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_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> │ │ │ │ +22#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ +24 │ │ │ │ +25#include │ │ │ │ +26namespace _g_t_s_a_m { │ │ │ │ +27 │ │ │ │ +28class DecisionTreeFactor; │ │ │ │ +29class DiscreteConditional; │ │ │ │ +30class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ +31 │ │ │ │ +_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_F_a_c_t_o_r: public _F_a_c_t_o_r { │ │ │ │ +39 │ │ │ │ +40public: │ │ │ │ +41 │ │ │ │ +42 // typedefs needed to play nice with gtsam │ │ │ │ +_4_3 typedef _D_i_s_c_r_e_t_e_F_a_c_t_o_r _T_h_i_s; │ │ │ │ +_4_4 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ +_4_5 typedef _F_a_c_t_o_r _B_a_s_e; │ │ │ │ +46 │ │ │ │ +_4_7 using _V_a_l_u_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ +48 │ │ │ │ +49public: │ │ │ │ +50 │ │ │ │ +53 │ │ │ │ +_5_5 _D_i_s_c_r_e_t_e_F_a_c_t_o_r() {} │ │ │ │ +56 │ │ │ │ +59 template │ │ │ │ +_6_0 _D_i_s_c_r_e_t_e_F_a_c_t_o_r(const CONTAINER& keys) : _B_a_s_e(keys) {} │ │ │ │ +61 │ │ │ │ +_6_3 virtual _~_D_i_s_c_r_e_t_e_F_a_c_t_o_r() { │ │ │ │ +64 } │ │ │ │ +65 │ │ │ │ +69 │ │ │ │ +_7_1 virtual bool _e_q_u_a_l_s(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r& lf, double tol = 1e-9) const = 0; │ │ │ │ +72 │ │ │ │ +_7_4 void _p_r_i_n_t( │ │ │ │ +75 const std::string& s = "DiscreteFactor\n", │ │ │ │ +76 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override { │ │ │ │ +77 Base::print(s, formatter); │ │ │ │ +78 } │ │ │ │ +79 │ │ │ │ +83 │ │ │ │ +_8_5 virtual double _o_p_e_r_a_t_o_r_(_)(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s&) const = 0; │ │ │ │ +86 │ │ │ │ +88 double error(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +89 │ │ │ │ +94 double error(const _H_y_b_r_i_d_V_a_l_u_e_s& c) const override; │ │ │ │ +95 │ │ │ │ +_9_7 virtual _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&) const = 0; │ │ │ │ +98 │ │ │ │ +99 virtual _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r toDecisionTreeFactor() const = 0; │ │ │ │ +100 │ │ │ │ +104 │ │ │ │ +_1_0_6 using _N_a_m_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s; │ │ │ │ +107 │ │ │ │ +_1_1_5 virtual std::string _m_a_r_k_d_o_w_n( │ │ │ │ +116 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ +117 const _N_a_m_e_s& names = {}) const = 0; │ │ │ │ +118 │ │ │ │ +_1_2_6 virtual std::string _h_t_m_l( │ │ │ │ +127 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ +128 const _N_a_m_e_s& names = {}) const = 0; │ │ │ │ +129 │ │ │ │ +131}; │ │ │ │ +132// DiscreteFactor │ │ │ │ +133 │ │ │ │ +134// traits │ │ │ │ +_1_3_5template<> struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_F_a_c_t_o_r> : public _T_e_s_t_a_b_l_e │ │ │ │ +{}; │ │ │ │ +136 │ │ │ │ +137 │ │ │ │ +154std::vector _e_x_p_N_o_r_m_a_l_i_z_e(const std::vector &logProbs); │ │ │ │ +155 │ │ │ │ +156 │ │ │ │ +157}// namespace gtsam │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ +_F_a_c_t_o_r_._h │ │ │ │ +The base class for all factors. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_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_:_:_e_x_p_N_o_r_m_a_l_i_z_e │ │ │ │ +std::vector< double > expNormalize(const std::vector< double > &logProbs) │ │ │ │ +Normalize a set of log probabilities. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.cpp:42 │ │ │ │ +_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_:_:_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_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_F_a_c_t_o_r_:_:_h_t_m_l │ │ │ │ +virtual std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, │ │ │ │ +const Names &names={}) const =0 │ │ │ │ +Render as html table. │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_B_a_s_e │ │ │ │ +Factor Base │ │ │ │ +Our base class. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:45 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="DiscreteFactor\n", const KeyFormatter │ │ │ │ +&formatter=DefaultKeyFormatter) const override │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:74 │ │ │ │ _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_F_a_c_t_o_r_:_:_~_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ +virtual ~DiscreteFactor() │ │ │ │ +Virtual destructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:63 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_N_a_m_e_s │ │ │ │ +DiscreteValues::Names Names │ │ │ │ +Translation table from values to strings. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:106 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ +virtual bool equals(const DiscreteFactor &lf, double tol=1e-9) const =0 │ │ │ │ +equals │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_T_h_i_s │ │ │ │ +DiscreteFactor This │ │ │ │ +This class. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:43 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +virtual DecisionTreeFactor operator*(const DecisionTreeFactor &) const =0 │ │ │ │ +Multiply in a DecisionTreeFactor and return the result as DecisionTreeFactor. │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +virtual double operator()(const DiscreteValues &) const =0 │ │ │ │ +Find value for given assignment of values to variables. │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_m_a_r_k_d_o_w_n │ │ │ │ +virtual std::string markdown(const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0 │ │ │ │ +Render as markdown table. │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ +DiscreteFactor(const CONTAINER &keys) │ │ │ │ +Construct from container of keys. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:60 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ +DiscreteFactor() │ │ │ │ +Default constructor creates empty factor. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:55 │ │ │ │ _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_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_:_:_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_:_:_F_a_c_t_o_r │ │ │ │ +DDeeffiinniittiioonn Factor.h:68 │ │ │ │ +_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 │ │ │ │ - * _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_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/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/DiscreteBayesTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,44 +96,47 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
DiscreteLookupDAG.h File Reference
│ │ │ +
DiscreteBayesTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

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

│ │ │ + │ │ │

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...
class  gtsam::DiscreteBayesTreeClique
 A clique in a DiscreteBayesTree. More...
 
struct  gtsam::traits< DiscreteLookupDAG >
class  gtsam::DiscreteBayesTree
 A Bayes tree representing a Discrete density. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
January, 2022
│ │ │ -
Author
Frank dellaert
│ │ │ +

Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

│ │ │ +

DiscreteBayesTree

Author
Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +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 │ │ │ │ -DiscreteLookupDAG.h File Reference │ │ │ │ +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_:_:_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_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_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_ _> │ │ │ │ +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 ********** │ │ │ │ - Date │ │ │ │ - January, 2022 │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +DiscreteBayesTree │ │ │ │ Author │ │ │ │ - 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_L_o_o_k_u_p_D_A_G_._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/a00194.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00194 = [ │ │ │ │ - ["gtsam::DiscreteLookupDAG", "a02888.html", "a02888"], │ │ │ │ - ["gtsam::traits< DiscreteLookupDAG >", "a02892.html", null] │ │ │ │ + ["gtsam::DiscreteBayesTreeClique", "a02824.html", "a02824"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00194_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,135 +98,134 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteLookupDAG.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
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
23
│ │ │ -
24#include <boost/shared_ptr.hpp>
│ │ │ -
25#include <string>
│ │ │ -
26#include <utility>
│ │ │ -
27#include <vector>
│ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
28
│ │ │ -
29namespace gtsam {
│ │ │ +
29#include <string>
│ │ │
30
│ │ │ -
31class DiscreteBayesNet;
│ │ │ +
31namespace gtsam {
│ │ │
32
│ │ │ -
│ │ │ -
40class GTSAM_EXPORT DiscreteLookupTable : public DiscreteConditional {
│ │ │ +
33// Forward declarations
│ │ │ +
34class DiscreteConditional;
│ │ │ +
35class VectorValues;
│ │ │ +
36
│ │ │ +
37/* ************************************************************************* */
│ │ │ +
│ │ │ +
39class GTSAM_EXPORT DiscreteBayesTreeClique
│ │ │ +
40 : public BayesTreeCliqueBase<DiscreteBayesTreeClique, DiscreteFactorGraph> {
│ │ │
41 public:
│ │ │ - │ │ │ -
43 using shared_ptr = boost::shared_ptr<This>;
│ │ │ -
44 using BaseConditional = Conditional<DecisionTreeFactor, This>;
│ │ │ -
45
│ │ │ -
│ │ │ -
53 DiscreteLookupTable(size_t nFrontals, const DiscreteKeys& keys,
│ │ │ -
54 const ADT& potentials)
│ │ │ -
55 : DiscreteConditional(nFrontals, keys, potentials) {}
│ │ │ -
│ │ │ -
56
│ │ │ -
58 void print(
│ │ │ -
59 const std::string& s = "Discrete Lookup Table: ",
│ │ │ -
60 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │ -
61
│ │ │ -
67 size_t argmax(const DiscreteValues& parentsValues) const;
│ │ │ -
68
│ │ │ -
73 void argmaxInPlace(DiscreteValues* parentsValues) const;
│ │ │ -
74};
│ │ │ + │ │ │ + │ │ │ +
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};
│ │ │
│ │ │ -
75
│ │ │ -
│ │ │ -
77class GTSAM_EXPORT DiscreteLookupDAG : public BayesNet<DiscreteLookupTable> {
│ │ │ -
78 public:
│ │ │ - │ │ │ -
80 using This = DiscreteLookupDAG;
│ │ │ -
81 using shared_ptr = boost::shared_ptr<This>;
│ │ │ +
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
│ │ │ - │ │ │ -
88
│ │ │ -
90 static DiscreteLookupDAG FromBayesNet(const DiscreteBayesNet& bayesNet);
│ │ │ -
91
│ │ │ -
93 virtual ~DiscreteLookupDAG() {}
│ │ │ -
94
│ │ │ -
96
│ │ │ -
99
│ │ │ -
101 bool equals(const This& bn, double tol = 1e-9) const;
│ │ │ + │ │ │ +
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
│ │ │ -
107
│ │ │ -
109 template <typename... Args>
│ │ │ -
│ │ │ -
110 void add(Args&&... args) {
│ │ │ -
111 emplace_shared<DiscreteLookupTable>(std::forward<Args>(args)...);
│ │ │ -
112 }
│ │ │ +
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
│ │ │ -
125 DiscreteValues argmax(DiscreteValues given = DiscreteValues()) const;
│ │ │ -
127
│ │ │ -
128 private:
│ │ │ -
130 friend class boost::serialization::access;
│ │ │ -
131 template <class ARCHIVE>
│ │ │ -
132 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ -
133 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
134 }
│ │ │ -
135};
│ │ │ -
│ │ │ -
136
│ │ │ -
137// traits
│ │ │ -
138template <>
│ │ │ -
139struct traits<DiscreteLookupDAG> : public Testable<DiscreteLookupDAG> {};
│ │ │ -
140
│ │ │ -
141} // namespace gtsam
│ │ │ - │ │ │ -
Factor Graph Base Class.
│ │ │ -
Bayes network.
│ │ │ +
114} // namespace gtsam
│ │ │ + │ │ │ + │ │ │ +
Bayes Tree is a tree of cliques of a Bayes Chain.
│ │ │ +
Base class for cliques of a BayesTree.
│ │ │ +
Base class for conditional densities.
│ │ │
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
│ │ │ +
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
│ │ │ -
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 Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
│ │ │ -
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ -
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ -
DiscreteLookupTable table for max-product.
Definition DiscreteLookupDAG.h:40
│ │ │ -
DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT &potentials)
Construct a new Discrete Lookup Table object.
Definition DiscreteLookupDAG.h:53
│ │ │ -
A DAG made from lookup tables, as defined above.
Definition DiscreteLookupDAG.h:77
│ │ │ -
bool equals(const This &bn, double tol=1e-9) const
Check equality.
│ │ │ -
DiscreteLookupDAG()
Construct empty DAG.
Definition DiscreteLookupDAG.h:87
│ │ │ -
void add(Args &&... args)
Add a DiscreteLookupTable.
Definition DiscreteLookupDAG.h:110
│ │ │ -
virtual ~DiscreteLookupDAG()
Destructor.
Definition DiscreteLookupDAG.h:93
│ │ │ +
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
│ │ │ -
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ -
Definition Conditional.h:64
│ │ │ +
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,164 +1,155 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteLookupDAG.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 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include <_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> │ │ │ │ -21#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_G_r_a_p_h_._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_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 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ +29#include │ │ │ │ 30 │ │ │ │ -31class DiscreteBayesNet; │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ 32 │ │ │ │ -_4_0class GTSAM_EXPORT _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e : public _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ +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 using _T_h_i_s = _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e; │ │ │ │ -43 using shared_ptr = boost::shared_ptr; │ │ │ │ -44 using BaseConditional = _C_o_n_d_i_t_i_o_n_a_l_<_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_,_ _T_h_i_s_>; │ │ │ │ -45 │ │ │ │ -_5_3 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e(size_t nFrontals, const _D_i_s_c_r_e_t_e_K_e_y_s& keys, │ │ │ │ -54 const _A_D_T& potentials) │ │ │ │ -55 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(nFrontals, keys, potentials) {} │ │ │ │ -56 │ │ │ │ -58 void _p_r_i_n_t( │ │ │ │ -59 const std::string& s = "Discrete Lookup Table: ", │ │ │ │ -60 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override; │ │ │ │ -61 │ │ │ │ -67 size_t argmax(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ +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 │ │ │ │ -73 void argmaxInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ -74}; │ │ │ │ -75 │ │ │ │ -_7_7class GTSAM_EXPORT _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G : public _B_a_y_e_s_N_e_t { │ │ │ │ -78 public: │ │ │ │ -79 using _B_a_s_e = _B_a_y_e_s_N_e_t_<_D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e_>; │ │ │ │ -80 using _T_h_i_s = _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G; │ │ │ │ -81 using shared_ptr = boost::shared_ptr; │ │ │ │ +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_7 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G() {} │ │ │ │ -88 │ │ │ │ -90 static _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G FromBayesNet(const _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t& bayesNet); │ │ │ │ -91 │ │ │ │ -_9_3 virtual _~_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G() {} │ │ │ │ -94 │ │ │ │ -96 │ │ │ │ -99 │ │ │ │ -_1_0_1 bool _e_q_u_a_l_s(const _T_h_i_s& bn, double tol = 1e-9) const; │ │ │ │ +_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 │ │ │ │ -107 │ │ │ │ -109 template │ │ │ │ -_1_1_0 void _a_d_d(Args&&... args) { │ │ │ │ -111 emplace_shared(std::forward(args)...); │ │ │ │ -112 } │ │ │ │ +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 │ │ │ │ -125 _D_i_s_c_r_e_t_e_V_a_l_u_e_s argmax(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given = _D_i_s_c_r_e_t_e_V_a_l_u_e_s()) const; │ │ │ │ -127 │ │ │ │ -128 private: │ │ │ │ -_1_3_0 friend class boost::serialization::access; │ │ │ │ -131 template │ │ │ │ -132 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -133 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -134 } │ │ │ │ -135}; │ │ │ │ -136 │ │ │ │ -137// traits │ │ │ │ -138template <> │ │ │ │ -_1_3_9struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -140 │ │ │ │ -141} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ -_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Factor Graph Base Class. │ │ │ │ -_B_a_y_e_s_N_e_t_._h │ │ │ │ -Bayes network. │ │ │ │ +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. │ │ │ │ +_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. │ │ │ │ +_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +Base class for conditional densities. │ │ │ │ _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_:_:_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_:_:_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_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -A Bayes net made from discrete conditional distributions. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:38 │ │ │ │ -_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_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_L_o_o_k_u_p_T_a_b_l_e │ │ │ │ -DiscreteLookupTable table for max-product. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:40 │ │ │ │ -_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 │ │ │ │ -DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT │ │ │ │ -&potentials) │ │ │ │ -Construct a new Discrete Lookup Table object. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:53 │ │ │ │ -_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. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:77 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const This &bn, double tol=1e-9) const │ │ │ │ -Check equality. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G │ │ │ │ -DiscreteLookupDAG() │ │ │ │ -Construct empty DAG. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:87 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_a_d_d │ │ │ │ -void add(Args &&... args) │ │ │ │ -Add a DiscreteLookupTable. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:110 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_~_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G │ │ │ │ -virtual ~DiscreteLookupDAG() │ │ │ │ -Destructor. │ │ │ │ -DDeeffiinniittiioonn DiscreteLookupDAG.h:93 │ │ │ │ +_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_N_e_t │ │ │ │ -A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ -DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ -_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ +_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 │ │ │ │ - * _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_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/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/DiscreteEliminationTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,33 +95,33 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
DiscreteLookupDAG.cpp File Reference
│ │ │ +
DiscreteEliminationTree.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ 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,21 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteLookupDAG.cpp File Reference │ │ │ │ +DiscreteEliminationTree.cpp File Reference │ │ │ │ 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_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_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/a00200.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteKey.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,60 +96,72 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
DiscreteKey.h File Reference
│ │ │ +
DecisionTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

specialized key for discrete variables │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  gtsam::DiscreteKeys
 DiscreteKeys is a set of keys that can be assembled using the & operator. More...
class  gtsam::DecisionTree< L, Y >
 a decision tree is a function from assignments to values. More...
 
struct  gtsam::traits< DiscreteKeys >
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Typedefs

using gtsam::DiscreteKey = std::pair< Key, size_t >
 Key type for discrete variables.
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

│ │ │ -DiscreteKeys gtsam::operator& (const DiscreteKey &key1, const DiscreteKey &key2)
 Create a list from two keys.
 
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

│ │ │ -

specialized key for discrete variables

│ │ │ -
Author
Frank Dellaert
│ │ │ -
Date
Feb 28, 2011
│ │ │ +

Decision Tree for use in DiscreteFactors.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
│ │ │ +Can Erdogan
│ │ │ +
Date
Jan 30, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -us-ascii │ │ │ │ +utf-8 │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,59 @@ │ │ │ │ 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 │ │ │ │ -DiscreteKey.h File Reference │ │ │ │ -specialized key for discrete variables _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 │ │ │ │ -struct   _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -  _D_i_s_c_r_e_t_e_K_e_y_s is a set of keys that can be assembled using the & │ │ │ │ - operator. _M_o_r_e_._._. │ │ │ │ + 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_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_K_e_y_s_ _> │ │ │ │ +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. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y = std::pair< _K_e_y, size_t > │ │ │ │ -  Key type for discrete variables. │ │ │ │ -  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::ooppeerraattoorr&& (const _D_i_s_c_r_e_t_e_K_e_y &key1, const _D_i_s_c_r_e_t_e_K_e_y │ │ │ │ - &key2) │ │ │ │ -  Create a list from two keys. │ │ │ │ +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 ********** │ │ │ │ -specialized key for discrete variables │ │ │ │ +Decision Tree for use in DiscreteFactors. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ + Can Erdogan │ │ │ │ Date │ │ │ │ - Feb 28, 2011 │ │ │ │ + Jan 30, 2012 │ │ │ │ * _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 │ │ │ │ + * _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/a00200.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,8 @@ │ │ │ │ var a00200 = [ │ │ │ │ - ["gtsam::DiscreteKeys", "a02876.html", "a02876"], │ │ │ │ - ["gtsam::traits< DiscreteKeys >", "a02880.html", null], │ │ │ │ - ["DiscreteKey", "a00200.html#gad529b58f00471d8f8b25a89b48b7afc2", null], │ │ │ │ - ["operator&", "a00200.html#a0be4f243161c2fd937df60aee511eb16", null] │ │ │ │ + ["gtsam::DecisionTree< L, Y >::Node", "a02800.html", "a02800"], │ │ │ │ + ["gtsam::traits< DecisionTree< L, Y > >", "a02804.html", null], │ │ │ │ + ["apply", "a00200.html#ae890a8919b441443ffdc0d8ab047838d", null], │ │ │ │ + ["apply", "a00200.html#ad19a5c8f7d997b0b16cf646659834b0f", null], │ │ │ │ + ["apply", "a00200.html#aaf5f5013828ac5e4750377dcad969276", null], │ │ │ │ + ["unzip", "a00200.html#a1744c5e018220146e8df7a68a05d5c43", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00200_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteKey.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,121 +98,333 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteKey.h
│ │ │ +
DecisionTree.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/inference/Key.h>
│ │ │ -
23
│ │ │ -
24#include <boost/serialization/vector.hpp>
│ │ │ -
25#include <map>
│ │ │ -
26#include <string>
│ │ │ -
27#include <vector>
│ │ │ -
28
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
36 using DiscreteKey = std::pair<Key,size_t>;
│ │ │ -
37
│ │ │ -
│ │ │ -
39 struct GTSAM_EXPORT DiscreteKeys: public std::vector<DiscreteKey> {
│ │ │ -
40
│ │ │ -
41 // Forward all constructors.
│ │ │ -
42 using std::vector<DiscreteKey>::vector;
│ │ │ -
43
│ │ │ -
45 DiscreteKeys() : std::vector<DiscreteKey>::vector() {}
│ │ │ -
46
│ │ │ -
48 explicit DiscreteKeys(const DiscreteKey& key) { push_back(key); }
│ │ │ -
49
│ │ │ -
│ │ │ -
51 explicit DiscreteKeys(std::map<Key, size_t> cardinalities) {
│ │ │ -
52 for (auto&& kv : cardinalities) emplace_back(kv);
│ │ │ -
53 }
│ │ │ -
│ │ │ -
54
│ │ │ -
│ │ │ -
56 DiscreteKeys(const std::vector<DiscreteKey>& keys) :
│ │ │ -
57 std::vector<DiscreteKey>(keys) {
│ │ │ -
58 }
│ │ │ -
│ │ │ -
59
│ │ │ -
61 DiscreteKeys(const std::vector<int>& cs);
│ │ │ -
62
│ │ │ -
64 KeyVector indices() const;
│ │ │ -
65
│ │ │ -
67 std::map<Key,size_t> cardinalities() const;
│ │ │ -
68
│ │ │ -
│ │ │ - │ │ │ -
71 push_back(key);
│ │ │ -
72 return *this;
│ │ │ -
73 }
│ │ │ -
│ │ │ -
74
│ │ │ -
76 void print(const std::string& s = "",
│ │ │ -
77 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ -
78
│ │ │ -
80 bool equals(const DiscreteKeys& other, double tol = 0) const;
│ │ │ -
81
│ │ │ -
83 friend class boost::serialization::access;
│ │ │ -
84 template <class ARCHIVE>
│ │ │ -
85 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ -
86 ar& boost::serialization::make_nvp(
│ │ │ -
87 "DiscreteKeys",
│ │ │ -
88 boost::serialization::base_object<std::vector<DiscreteKey>>(*this));
│ │ │ -
89 }
│ │ │ -
90
│ │ │ -
91 }; // DiscreteKeys
│ │ │ -
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/base/Testable.h>
│ │ │ +
23#include <gtsam/base/types.h>
│ │ │ + │ │ │ +
25
│ │ │ +
26#include <boost/serialization/nvp.hpp>
│ │ │ +
27#include <boost/shared_ptr.hpp>
│ │ │ +
28#include <functional>
│ │ │ +
29#include <iostream>
│ │ │ +
30#include <map>
│ │ │ +
31#include <set>
│ │ │ +
32#include <sstream>
│ │ │ +
33#include <string>
│ │ │ +
34#include <utility>
│ │ │ +
35#include <vector>
│ │ │ +
36
│ │ │ +
37namespace gtsam {
│ │ │ +
38
│ │ │ +
60 template<typename L, typename Y>
│ │ │ +
│ │ │ + │ │ │ +
62 protected:
│ │ │ +
│ │ │ +
64 static bool DefaultCompare(const Y& a, const Y& b) {
│ │ │ +
65 return a == b;
│ │ │ +
66 }
│ │ │ +
│ │ │ +
67
│ │ │ +
68 public:
│ │ │ +
69 using LabelFormatter = std::function<std::string(L)>;
│ │ │ +
70 using ValueFormatter = std::function<std::string(Y)>;
│ │ │ +
71 using CompareFunc = std::function<bool(const Y&, const Y&)>;
│ │ │ +
72
│ │ │ +
74 using Unary = std::function<Y(const Y&)>;
│ │ │ +
75 using UnaryAssignment = std::function<Y(const Assignment<L>&, const Y&)>;
│ │ │ +
76 using Binary = std::function<Y(const Y&, const Y&)>;
│ │ │ +
77
│ │ │ +
79 using LabelC = std::pair<L, size_t>;
│ │ │ +
80
│ │ │ +
82 struct Leaf;
│ │ │ +
83 struct Choice;
│ │ │ +
84
│ │ │ +
│ │ │ +
86 struct Node {
│ │ │ +
87 using Ptr = boost::shared_ptr<const Node>;
│ │ │ +
88
│ │ │ +
89#ifdef DT_DEBUG_MEMORY
│ │ │ +
90 static int nrNodes;
│ │ │ +
91#endif
│ │ │
92
│ │ │ -
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.
│ │ │ -
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │ +
93 // Constructor
│ │ │ +
94 Node() {
│ │ │ +
95#ifdef DT_DEBUG_MEMORY
│ │ │ +
96 std::cout << ++nrNodes << " constructed " << id() << std::endl;
│ │ │ +
97 std::cout.flush();
│ │ │ +
98#endif
│ │ │ +
99 }
│ │ │ +
100
│ │ │ +
101 // Destructor
│ │ │ +
102 virtual ~Node() {
│ │ │ +
103#ifdef DT_DEBUG_MEMORY
│ │ │ +
104 std::cout << --nrNodes << " destructed " << id() << std::endl;
│ │ │ +
105 std::cout.flush();
│ │ │ +
106#endif
│ │ │ +
107 }
│ │ │ +
108
│ │ │ +
109 // Unique ID for dot files
│ │ │ +
110 const void* id() const { return this; }
│ │ │ +
111
│ │ │ +
112 // everything else is virtual, no documentation here as internal
│ │ │ +
113 virtual void print(const std::string& s,
│ │ │ +
114 const LabelFormatter& labelFormatter,
│ │ │ +
115 const ValueFormatter& valueFormatter) const = 0;
│ │ │ +
116 virtual void dot(std::ostream& os, const LabelFormatter& labelFormatter,
│ │ │ +
117 const ValueFormatter& valueFormatter,
│ │ │ +
118 bool showZero) const = 0;
│ │ │ +
119 virtual bool sameLeaf(const Leaf& q) const = 0;
│ │ │ +
120 virtual bool sameLeaf(const Node& q) const = 0;
│ │ │ +
121 virtual bool equals(const Node& other, const CompareFunc& compare =
│ │ │ +
122 &DefaultCompare) const = 0;
│ │ │ +
123 virtual const Y& operator()(const Assignment<L>& x) const = 0;
│ │ │ +
124 virtual Ptr apply(const Unary& op) const = 0;
│ │ │ +
125 virtual Ptr apply(const UnaryAssignment& op,
│ │ │ +
126 const Assignment<L>& assignment) const = 0;
│ │ │ +
127 virtual Ptr apply_f_op_g(const Node&, const Binary&) const = 0;
│ │ │ +
128 virtual Ptr apply_g_op_fL(const Leaf&, const Binary&) const = 0;
│ │ │ +
129 virtual Ptr apply_g_op_fC(const Choice&, const Binary&) const = 0;
│ │ │ +
130 virtual Ptr choose(const L& label, size_t index) const = 0;
│ │ │ +
131 virtual bool isLeaf() const = 0;
│ │ │ +
132
│ │ │ +
133 private:
│ │ │ + │ │ │ +
136 template <class ARCHIVE>
│ │ │ +
137 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {}
│ │ │ +
138 };
│ │ │ +
│ │ │ +
141 public:
│ │ │ +
143 using NodePtr = typename Node::Ptr;
│ │ │ +
144
│ │ │ + │ │ │ +
147
│ │ │ +
148 protected:
│ │ │ +
153 template<typename It, typename ValueIt>
│ │ │ +
154 NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const;
│ │ │ +
155
│ │ │ +
166 template <typename M, typename X>
│ │ │ + │ │ │ +
168 std::function<L(const M&)> L_of_M,
│ │ │ +
169 std::function<Y(const X&)> Y_of_X) const;
│ │ │ +
170
│ │ │ +
171 public:
│ │ │ +
174
│ │ │ +
176 DecisionTree();
│ │ │ +
177
│ │ │ +
179 explicit DecisionTree(const Y& y);
│ │ │ +
180
│ │ │ +
188 DecisionTree(const L& label, const Y& y1, const Y& y2);
│ │ │ +
189
│ │ │ +
191 DecisionTree(const LabelC& label, const Y& y1, const Y& y2);
│ │ │ +
192
│ │ │ +
194 DecisionTree(const std::vector<LabelC>& labelCs, const std::vector<Y>& ys);
│ │ │ +
195
│ │ │ +
197 DecisionTree(const std::vector<LabelC>& labelCs, const std::string& table);
│ │ │ +
198
│ │ │ +
200 template<typename Iterator>
│ │ │ +
201 DecisionTree(Iterator begin, Iterator end, const L& label);
│ │ │ +
202
│ │ │ +
204 DecisionTree(const L& label, const DecisionTree& f0,
│ │ │ +
205 const DecisionTree& f1);
│ │ │ +
206
│ │ │ +
214 template <typename X, typename Func>
│ │ │ +
215 DecisionTree(const DecisionTree<L, X>& other, Func Y_of_X);
│ │ │ +
216
│ │ │ +
227 template <typename M, typename X, typename Func>
│ │ │ +
228 DecisionTree(const DecisionTree<M, X>& other, const std::map<M, L>& map,
│ │ │ +
229 Func Y_of_X);
│ │ │ +
230
│ │ │ +
234
│ │ │ +
242 void print(const std::string& s, const LabelFormatter& labelFormatter,
│ │ │ +
243 const ValueFormatter& valueFormatter) const;
│ │ │ +
244
│ │ │ +
245 // Testable
│ │ │ +
246 bool equals(const DecisionTree& other,
│ │ │ +
247 const CompareFunc& compare = &DefaultCompare) const;
│ │ │ +
248
│ │ │ +
252
│ │ │ +
254 virtual ~DecisionTree() = default;
│ │ │ +
255
│ │ │ +
257 bool empty() const { return !root_; }
│ │ │ +
258
│ │ │ +
260 bool operator==(const DecisionTree& q) const;
│ │ │ +
261
│ │ │ +
263 const Y& operator()(const Assignment<L>& x) const;
│ │ │ +
264
│ │ │ +
279 template <typename Func>
│ │ │ +
280 void visit(Func f) const;
│ │ │ +
281
│ │ │ +
296 template <typename Func>
│ │ │ +
297 void visitLeaf(Func f) const;
│ │ │ +
298
│ │ │ +
313 template <typename Func>
│ │ │ +
314 void visitWith(Func f) const;
│ │ │ +
315
│ │ │ +
317 size_t nrLeaves() const;
│ │ │ +
318
│ │ │ +
334 template <typename Func, typename X>
│ │ │ +
335 X fold(Func f, X x0) const;
│ │ │ +
336
│ │ │ +
338 std::set<L> labels() const;
│ │ │ +
339
│ │ │ +
341 DecisionTree apply(const Unary& op) const;
│ │ │ +
342
│ │ │ +
351 DecisionTree apply(const UnaryAssignment& op) const;
│ │ │ +
352
│ │ │ +
354 DecisionTree apply(const DecisionTree& g, const Binary& op) const;
│ │ │ +
355
│ │ │ +
│ │ │ +
358 DecisionTree choose(const L& label, size_t index) const {
│ │ │ +
359 NodePtr newRoot = root_->choose(label, index);
│ │ │ +
360 return DecisionTree(newRoot);
│ │ │ +
361 }
│ │ │ +
│ │ │ +
362
│ │ │ +
364 DecisionTree combine(const L& label, size_t cardinality,
│ │ │ +
365 const Binary& op) const;
│ │ │ +
366
│ │ │ +
│ │ │ +
368 DecisionTree combine(const LabelC& labelC, const Binary& op) const {
│ │ │ +
369 return combine(labelC.first, labelC.second, op);
│ │ │ +
370 }
│ │ │ +
│ │ │ +
371
│ │ │ +
373 void dot(std::ostream& os, const LabelFormatter& labelFormatter,
│ │ │ +
374 const ValueFormatter& valueFormatter, bool showZero = true) const;
│ │ │ +
375
│ │ │ +
377 void dot(const std::string& name, const LabelFormatter& labelFormatter,
│ │ │ +
378 const ValueFormatter& valueFormatter, bool showZero = true) const;
│ │ │ +
379
│ │ │ +
381 std::string dot(const LabelFormatter& labelFormatter,
│ │ │ +
382 const ValueFormatter& valueFormatter,
│ │ │ +
383 bool showZero = true) const;
│ │ │ +
384
│ │ │ +
387
│ │ │ +
388 // internal use only
│ │ │ +
389 explicit DecisionTree(const NodePtr& root);
│ │ │ +
390
│ │ │ +
391 // internal use only
│ │ │ +
392 template<typename Iterator> NodePtr
│ │ │ +
393 compose(Iterator begin, Iterator end, const L& label) const;
│ │ │ +
394
│ │ │ +
396
│ │ │ +
397 private:
│ │ │ + │ │ │ +
400 template <class ARCHIVE>
│ │ │ +
401 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ +
402 ar& BOOST_SERIALIZATION_NVP(root_);
│ │ │ +
403 }
│ │ │ +
404 }; // DecisionTree
│ │ │ +
│ │ │ +
405
│ │ │ +
406 template <class L, class Y>
│ │ │ +
407 struct traits<DecisionTree<L, Y>> : public Testable<DecisionTree<L, Y>> {};
│ │ │ +
408
│ │ │ +
412 template<typename L, typename Y>
│ │ │ +
│ │ │ + │ │ │ +
414 const typename DecisionTree<L, Y>::Unary& op) {
│ │ │ +
415 return f.apply(op);
│ │ │ +
416 }
│ │ │ +
│ │ │ +
417
│ │ │ +
419 template<typename L, typename Y>
│ │ │ +
│ │ │ + │ │ │ +
421 const typename DecisionTree<L, Y>::UnaryAssignment& op) {
│ │ │ +
422 return f.apply(op);
│ │ │ +
423 }
│ │ │ +
│ │ │ +
424
│ │ │ +
426 template<typename L, typename Y>
│ │ │ +
│ │ │ + │ │ │ +
428 const DecisionTree<L, Y>& g,
│ │ │ +
429 const typename DecisionTree<L, Y>::Binary& op) {
│ │ │ +
430 return f.apply(g, op);
│ │ │ +
431 }
│ │ │ +
│ │ │ +
432
│ │ │ +
439 template <typename L, typename T1, typename T2>
│ │ │ +
│ │ │ +
440 std::pair<DecisionTree<L, T1>, DecisionTree<L, T2> > unzip(
│ │ │ +
441 const DecisionTree<L, std::pair<T1, T2> >& input) {
│ │ │ +
442 return std::make_pair(
│ │ │ +
443 DecisionTree<L, T1>(input, [](std::pair<T1, T2> i) { return i.first; }),
│ │ │ + │ │ │ +
445 [](std::pair<T1, T2> i) { return i.second; }));
│ │ │ +
446 }
│ │ │ +
│ │ │ +
447
│ │ │ +
448} // namespace gtsam
│ │ │ +
Typedefs for easier changing of types.
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
An assignment from labels to a discrete value index (size_t)
│ │ │
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
│ │ │ +
std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > unzip(const DecisionTree< L, std::pair< T1, T2 > > &input)
unzip a DecisionTree with std::pair values.
Definition DecisionTree.h:440
│ │ │ +
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
│ │ │
Template to create a binary predicate.
Definition Testable.h:111
│ │ │
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ -
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ -
DiscreteKeys & operator&(const DiscreteKey &key)
Add a key (non-const!)
Definition DiscreteKey.h:70
│ │ │ -
DiscreteKeys()
Constructor for serialization.
Definition DiscreteKey.h:45
│ │ │ -
DiscreteKeys(const DiscreteKey &key)
Construct from a key.
Definition DiscreteKey.h:48
│ │ │ -
DiscreteKeys(const std::vector< DiscreteKey > &keys)
Construct from a vector of keys.
Definition DiscreteKey.h:56
│ │ │ -
DiscreteKeys(std::map< Key, size_t > cardinalities)
Construct from cardinalities.
Definition DiscreteKey.h:51
│ │ │ +
An assignment from labels to value index (size_t).
Definition Assignment.h:37
│ │ │ +
Definition DecisionTree-inl.h:52
│ │ │ +
Definition DecisionTree-inl.h:172
│ │ │ +
a decision tree is a function from assignments to values.
Definition DecisionTree.h:61
│ │ │ +
DecisionTree apply(const Unary &op) const
apply Unary operation "op" to f
Definition DecisionTree-inl.h:889
│ │ │ +
DecisionTree choose(const L &label, size_t index) const
create a new function where value(label)==index It's like "restrict" in Darwiche09book pg329,...
Definition DecisionTree.h:358
│ │ │ +
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<M, X> to DecisionTree<L, Y>.
Definition DecisionTree-inl.h:671
│ │ │ +
DecisionTree combine(const LabelC &labelC, const Binary &op) const
combine with LabelC for convenience
Definition DecisionTree.h:368
│ │ │ +
NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const
Internal recursive function to create from keys, cardinalities, and Y values.
Definition DecisionTree-inl.h:630
│ │ │ +
virtual ~DecisionTree()=default
Make virtual.
│ │ │ +
static bool DefaultCompare(const Y &a, const Y &b)
Default method for comparison of two objects of type Y.
Definition DecisionTree.h:64
│ │ │ +
typename Node::Ptr NodePtr
---------------------— Node base class ------------------------—
Definition DecisionTree.h:143
│ │ │ +
std::set< L > labels() const
Retrieve all unique labels as a set.
Definition DecisionTree-inl.h:853
│ │ │ +
bool empty() const
Check if tree is empty.
Definition DecisionTree.h:257
│ │ │ +
void visit(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:736
│ │ │ +
void visitLeaf(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:773
│ │ │ +
std::function< Y(const Y &)> Unary
Handy typedefs for unary and binary function types.
Definition DecisionTree.h:74
│ │ │ +
X fold(Func f, X x0) const
Fold a binary function over the tree, returning accumulator.
Definition DecisionTree-inl.h:833
│ │ │ +
NodePtr root_
A DecisionTree just contains the root. TODO(dellaert): make protected.
Definition DecisionTree.h:146
│ │ │ +
void print(const std::string &s, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter) const
GTSAM-style print.
Definition DecisionTree-inl.h:872
│ │ │ +
DecisionTree combine(const L &label, size_t cardinality, const Binary &op) const
combine subtrees on key with binary operation "op"
Definition DecisionTree-inl.h:937
│ │ │ +
void visitWith(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:816
│ │ │ +
const Y & operator()(const Assignment< L > &x) const
evaluate
Definition DecisionTree-inl.h:884
│ │ │ +
void dot(std::ostream &os, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter, bool showZero=true) const
output to graphviz format, stream version
Definition DecisionTree-inl.h:949
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition DecisionTree.h:399
│ │ │ +
bool operator==(const DecisionTree &q) const
equality
Definition DecisionTree-inl.h:879
│ │ │ +
std::pair< L, size_t > LabelC
A label annotated with cardinality.
Definition DecisionTree.h:79
│ │ │ +
size_t nrLeaves() const
Return the number of leaves in the tree.
Definition DecisionTree-inl.h:823
│ │ │ +
DecisionTree()
Default constructor (for serialization)
Definition DecisionTree-inl.h:462
│ │ │ +
---------------------— Node base class ------------------------—
Definition DecisionTree.h:86
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition DecisionTree.h:135
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -us-ascii │ │ │ │ +utf-8 │ │ │ ├── html2text {} │ │ │ │ @@ -1,148 +1,417 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteKey.h │ │ │ │ +DecisionTree.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_l_o_b_a_l___i_n_c_l_u_d_e_s_._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#include │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -_3_6 using _D_i_s_c_r_e_t_e_K_e_y = std::pair; │ │ │ │ -37 │ │ │ │ -_3_9 struct GTSAM_EXPORT _D_i_s_c_r_e_t_e_K_e_y_s: public std::vector { │ │ │ │ -40 │ │ │ │ -41 // Forward all constructors. │ │ │ │ -42 using std::vector<_D_i_s_c_r_e_t_e_K_e_y>::vector; │ │ │ │ -43 │ │ │ │ -_4_5 _D_i_s_c_r_e_t_e_K_e_y_s() : std::vector<_D_i_s_c_r_e_t_e_K_e_y>::vector() {} │ │ │ │ -46 │ │ │ │ -_4_8 explicit _D_i_s_c_r_e_t_e_K_e_y_s(const _D_i_s_c_r_e_t_e_K_e_y& key) { push_back(key); } │ │ │ │ -49 │ │ │ │ -_5_1 explicit _D_i_s_c_r_e_t_e_K_e_y_s(std::map cardinalities) { │ │ │ │ -52 for (auto&& kv : cardinalities) emplace_back(kv); │ │ │ │ -53 } │ │ │ │ -54 │ │ │ │ -_5_6 _D_i_s_c_r_e_t_e_K_e_y_s(const std::vector& keys) : │ │ │ │ -57 std::vector<_D_i_s_c_r_e_t_e_K_e_y>(keys) { │ │ │ │ -58 } │ │ │ │ -59 │ │ │ │ -61 _D_i_s_c_r_e_t_e_K_e_y_s(const std::vector& cs); │ │ │ │ -62 │ │ │ │ -64 _K_e_y_V_e_c_t_o_r indices() const; │ │ │ │ -65 │ │ │ │ -67 std::map cardinalities() const; │ │ │ │ -68 │ │ │ │ -_7_0 _D_i_s_c_r_e_t_e_K_e_y_s& _o_p_e_r_a_t_o_r_&(const _D_i_s_c_r_e_t_e_K_e_y& key) { │ │ │ │ -71 push_back(key); │ │ │ │ -72 return *this; │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -76 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ -77 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ -78 │ │ │ │ -80 bool _e_q_u_a_l_s(const _D_i_s_c_r_e_t_e_K_e_y_s& other, double tol = 0) const; │ │ │ │ -81 │ │ │ │ -_8_3 friend class boost::serialization::access; │ │ │ │ -84 template │ │ │ │ -85 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -86 ar& boost::serialization::make_nvp( │ │ │ │ -87 "DiscreteKeys", │ │ │ │ -88 boost::serialization::base_object>(*this)); │ │ │ │ -89 } │ │ │ │ -90 │ │ │ │ -91 }; // DiscreteKeys │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +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_/_t_y_p_e_s_._h> │ │ │ │ +24#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> │ │ │ │ +25 │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32#include │ │ │ │ +33#include │ │ │ │ +34#include │ │ │ │ +35#include │ │ │ │ +36 │ │ │ │ +37namespace _g_t_s_a_m { │ │ │ │ +38 │ │ │ │ +60 template │ │ │ │ +_6_1 class _D_e_c_i_s_i_o_n_T_r_e_e { │ │ │ │ +62 protected: │ │ │ │ +_6_4 static bool _D_e_f_a_u_l_t_C_o_m_p_a_r_e(const Y& a, const Y& b) { │ │ │ │ +65 return a == b; │ │ │ │ +66 } │ │ │ │ +67 │ │ │ │ +68 public: │ │ │ │ +69 using LabelFormatter = std::function; │ │ │ │ +70 using ValueFormatter = std::function; │ │ │ │ +71 using CompareFunc = std::function; │ │ │ │ +72 │ │ │ │ +_7_4 using _U_n_a_r_y = std::function; │ │ │ │ +75 using UnaryAssignment = std::function&, const Y&)>; │ │ │ │ +76 using Binary = std::function; │ │ │ │ +77 │ │ │ │ +_7_9 using _L_a_b_e_l_C = std::pair; │ │ │ │ +80 │ │ │ │ +82 struct _L_e_a_f; │ │ │ │ +83 struct _C_h_o_i_c_e; │ │ │ │ +84 │ │ │ │ +_8_6 struct _N_o_d_e { │ │ │ │ +87 using Ptr = boost::shared_ptr; │ │ │ │ +88 │ │ │ │ +89#ifdef DT_DEBUG_MEMORY │ │ │ │ +90 static int nrNodes; │ │ │ │ +91#endif │ │ │ │ 92 │ │ │ │ -94 GTSAM_EXPORT DiscreteKeys _o_p_e_r_a_t_o_r_&(const _D_i_s_c_r_e_t_e_K_e_y& key1, const │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y& key2); │ │ │ │ -95 │ │ │ │ -96 // traits │ │ │ │ -97 template <> │ │ │ │ -_9_8 struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_K_e_y_s> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -99 │ │ │ │ -100 } // namespace gtsam │ │ │ │ -_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_:_:_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 │ │ │ │ +93 // Constructor │ │ │ │ +94 _N_o_d_e() { │ │ │ │ +95#ifdef DT_DEBUG_MEMORY │ │ │ │ +96 std::cout << ++nrNodes << " constructed " << id() << std::endl; │ │ │ │ +97 std::cout.flush(); │ │ │ │ +98#endif │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +101 // Destructor │ │ │ │ +102 virtual _~_N_o_d_e() { │ │ │ │ +103#ifdef DT_DEBUG_MEMORY │ │ │ │ +104 std::cout << --nrNodes << " destructed " << id() << std::endl; │ │ │ │ +105 std::cout.flush(); │ │ │ │ +106#endif │ │ │ │ +107 } │ │ │ │ +108 │ │ │ │ +109 // Unique ID for dot files │ │ │ │ +110 const void* id() const { return this; } │ │ │ │ +111 │ │ │ │ +112 // everything else is virtual, no documentation here as internal │ │ │ │ +113 virtual void print(const std::string& s, │ │ │ │ +114 const LabelFormatter& labelFormatter, │ │ │ │ +115 const ValueFormatter& valueFormatter) const = 0; │ │ │ │ +116 virtual void dot(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ +117 const ValueFormatter& valueFormatter, │ │ │ │ +118 bool showZero) const = 0; │ │ │ │ +119 virtual bool sameLeaf(const _L_e_a_f& q) const = 0; │ │ │ │ +120 virtual bool sameLeaf(const _N_o_d_e& q) const = 0; │ │ │ │ +121 virtual bool _e_q_u_a_l_s(const _N_o_d_e& other, const CompareFunc& compare = │ │ │ │ +122 &_D_e_f_a_u_l_t_C_o_m_p_a_r_e) const = 0; │ │ │ │ +123 virtual const Y& operator()(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const = 0; │ │ │ │ +124 virtual Ptr apply(const _U_n_a_r_y& op) const = 0; │ │ │ │ +125 virtual Ptr apply(const UnaryAssignment& op, │ │ │ │ +126 const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment) const = 0; │ │ │ │ +127 virtual Ptr apply_f_op_g(const _N_o_d_e&, const Binary&) const = 0; │ │ │ │ +128 virtual Ptr apply_g_op_fL(const _L_e_a_f&, const Binary&) const = 0; │ │ │ │ +129 virtual Ptr apply_g_op_fC(const _C_h_o_i_c_e&, const Binary&) const = 0; │ │ │ │ +130 virtual Ptr choose(const L& label, size_t index) const = 0; │ │ │ │ +131 virtual bool isLeaf() const = 0; │ │ │ │ +132 │ │ │ │ +133 private: │ │ │ │ +_1_3_5 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; │ │ │ │ +136 template │ │ │ │ +137 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {} │ │ │ │ +138 }; │ │ │ │ +141 public: │ │ │ │ +_1_4_3 using _N_o_d_e_P_t_r = typename Node::Ptr; │ │ │ │ +144 │ │ │ │ +_1_4_6 _N_o_d_e_P_t_r _r_o_o_t__; │ │ │ │ +147 │ │ │ │ +148 protected: │ │ │ │ +153 template │ │ │ │ +154 _N_o_d_e_P_t_r _c_r_e_a_t_e(It begin, It end, ValueIt beginY, ValueIt endY) const; │ │ │ │ +155 │ │ │ │ +166 template │ │ │ │ +167 _N_o_d_e_P_t_r _c_o_n_v_e_r_t_F_r_o_m(const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>_:_:_N_o_d_e_P_t_r& f, │ │ │ │ +168 std::function L_of_M, │ │ │ │ +169 std::function Y_of_X) const; │ │ │ │ +170 │ │ │ │ +171 public: │ │ │ │ +174 │ │ │ │ +176 _D_e_c_i_s_i_o_n_T_r_e_e(); │ │ │ │ +177 │ │ │ │ +179 explicit _D_e_c_i_s_i_o_n_T_r_e_e(const Y& y); │ │ │ │ +180 │ │ │ │ +188 _D_e_c_i_s_i_o_n_T_r_e_e(const L& label, const Y& y1, const Y& y2); │ │ │ │ +189 │ │ │ │ +191 _D_e_c_i_s_i_o_n_T_r_e_e(const _L_a_b_e_l_C& label, const Y& y1, const Y& y2); │ │ │ │ +192 │ │ │ │ +194 _D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, const std::vector& ys); │ │ │ │ +195 │ │ │ │ +197 _D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, const std::string& table); │ │ │ │ +198 │ │ │ │ +200 template │ │ │ │ +201 _D_e_c_i_s_i_o_n_T_r_e_e(Iterator begin, Iterator end, const L& label); │ │ │ │ +202 │ │ │ │ +204 _D_e_c_i_s_i_o_n_T_r_e_e(const L& label, const _D_e_c_i_s_i_o_n_T_r_e_e& f0, │ │ │ │ +205 const _D_e_c_i_s_i_o_n_T_r_e_e& f1); │ │ │ │ +206 │ │ │ │ +214 template │ │ │ │ +215 _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, Func Y_of_X); │ │ │ │ +216 │ │ │ │ +227 template │ │ │ │ +228 _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, const std::map& map, │ │ │ │ +229 Func Y_of_X); │ │ │ │ +230 │ │ │ │ +234 │ │ │ │ +242 void _p_r_i_n_t(const std::string& s, const LabelFormatter& labelFormatter, │ │ │ │ +243 const ValueFormatter& valueFormatter) const; │ │ │ │ +244 │ │ │ │ +245 // Testable │ │ │ │ +246 bool _e_q_u_a_l_s(const _D_e_c_i_s_i_o_n_T_r_e_e& other, │ │ │ │ +247 const CompareFunc& compare = &_D_e_f_a_u_l_t_C_o_m_p_a_r_e) const; │ │ │ │ +248 │ │ │ │ +252 │ │ │ │ +_2_5_4 virtual _~_D_e_c_i_s_i_o_n_T_r_e_e() = default; │ │ │ │ +255 │ │ │ │ +_2_5_7 bool _e_m_p_t_y() const { return !_r_o_o_t__; } │ │ │ │ +258 │ │ │ │ +260 bool _o_p_e_r_a_t_o_r_=_=(const _D_e_c_i_s_i_o_n_T_r_e_e& q) const; │ │ │ │ +261 │ │ │ │ +263 const Y& _o_p_e_r_a_t_o_r_(_)(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const; │ │ │ │ +264 │ │ │ │ +279 template │ │ │ │ +280 void _v_i_s_i_t(Func f) const; │ │ │ │ +281 │ │ │ │ +296 template │ │ │ │ +297 void _v_i_s_i_t_L_e_a_f(Func f) const; │ │ │ │ +298 │ │ │ │ +313 template │ │ │ │ +314 void _v_i_s_i_t_W_i_t_h(Func f) const; │ │ │ │ +315 │ │ │ │ +317 size_t _n_r_L_e_a_v_e_s() const; │ │ │ │ +318 │ │ │ │ +334 template │ │ │ │ +335 X _f_o_l_d(Func f, X x0) const; │ │ │ │ +336 │ │ │ │ +338 std::set _l_a_b_e_l_s() const; │ │ │ │ +339 │ │ │ │ +341 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const _U_n_a_r_y& op) const; │ │ │ │ +342 │ │ │ │ +351 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const UnaryAssignment& op) const; │ │ │ │ +352 │ │ │ │ +354 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const _D_e_c_i_s_i_o_n_T_r_e_e& g, const Binary& op) const; │ │ │ │ +355 │ │ │ │ +_3_5_8 _D_e_c_i_s_i_o_n_T_r_e_e _c_h_o_o_s_e(const L& label, size_t index) const { │ │ │ │ +359 _N_o_d_e_P_t_r newRoot = _r_o_o_t__->_c_h_o_o_s_e(label, index); │ │ │ │ +360 return _D_e_c_i_s_i_o_n_T_r_e_e(newRoot); │ │ │ │ +361 } │ │ │ │ +362 │ │ │ │ +364 _D_e_c_i_s_i_o_n_T_r_e_e combine(const L& label, size_t cardinality, │ │ │ │ +365 const Binary& op) const; │ │ │ │ +366 │ │ │ │ +_3_6_8 _D_e_c_i_s_i_o_n_T_r_e_e _c_o_m_b_i_n_e(const _L_a_b_e_l_C& labelC, const Binary& op) const { │ │ │ │ +369 return _c_o_m_b_i_n_e(labelC.first, labelC.second, op); │ │ │ │ +370 } │ │ │ │ +371 │ │ │ │ +373 void _d_o_t(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ +374 const ValueFormatter& valueFormatter, bool showZero = true) const; │ │ │ │ +375 │ │ │ │ +377 void _d_o_t(const std::string& name, const LabelFormatter& labelFormatter, │ │ │ │ +378 const ValueFormatter& valueFormatter, bool showZero = true) const; │ │ │ │ +379 │ │ │ │ +381 std::string _d_o_t(const LabelFormatter& labelFormatter, │ │ │ │ +382 const ValueFormatter& valueFormatter, │ │ │ │ +383 bool showZero = true) const; │ │ │ │ +384 │ │ │ │ +387 │ │ │ │ +388 // internal use only │ │ │ │ +389 explicit _D_e_c_i_s_i_o_n_T_r_e_e(const _N_o_d_e_P_t_r& root); │ │ │ │ +390 │ │ │ │ +391 // internal use only │ │ │ │ +392 template _N_o_d_e_P_t_r │ │ │ │ +393 compose(Iterator begin, Iterator end, const L& label) const; │ │ │ │ +394 │ │ │ │ +396 │ │ │ │ +397 private: │ │ │ │ +_3_9_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; │ │ │ │ +400 template │ │ │ │ +401 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ +402 ar& BOOST_SERIALIZATION_NVP(_r_o_o_t__); │ │ │ │ +403 } │ │ │ │ +404 }; // DecisionTree │ │ │ │ +405 │ │ │ │ +406 template │ │ │ │ +_4_0_7 struct _t_r_a_i_t_s<_D_e_c_i_s_i_o_n_T_r_e_e> : public _T_e_s_t_a_b_l_e> {}; │ │ │ │ +408 │ │ │ │ +412 template │ │ │ │ +_4_1_3 _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_<_L_,_ _Y_>& f, │ │ │ │ +414 const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_U_n_a_r_y& op) { │ │ │ │ +415 return f._a_p_p_l_y(op); │ │ │ │ +416 } │ │ │ │ +417 │ │ │ │ +419 template │ │ │ │ +_4_2_0 _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_<_L_,_ _Y_>& f, │ │ │ │ +421 const typename DecisionTree::UnaryAssignment& op) { │ │ │ │ +422 return f._a_p_p_l_y(op); │ │ │ │ +423 } │ │ │ │ +424 │ │ │ │ +426 template │ │ │ │ +_4_2_7 _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_<_L_,_ _Y_>& f, │ │ │ │ +428 const _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>& g, │ │ │ │ +429 const typename DecisionTree::Binary& op) { │ │ │ │ +430 return f._a_p_p_l_y(g, op); │ │ │ │ +431 } │ │ │ │ +432 │ │ │ │ +439 template │ │ │ │ +_4_4_0 std::pair, _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_2_> > _u_n_z_i_p( │ │ │ │ +441 const _D_e_c_i_s_i_o_n_T_r_e_e >& input) { │ │ │ │ +442 return std::make_pair( │ │ │ │ +443 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_1_>(input, [](std::pair i) { return i.first; }), │ │ │ │ +444 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_2_>(input, │ │ │ │ +445 [](std::pair i) { return i.second; })); │ │ │ │ +446 } │ │ │ │ +447 │ │ │ │ +448} // namespace gtsam │ │ │ │ +_t_y_p_e_s_._h │ │ │ │ +Typedefs for easier changing of types. │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ +An assignment from labels to a discrete value index (size_t) │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_o_p_e_r_a_t_o_r_& │ │ │ │ -DiscreteKeys operator&(const DiscreteKey &key1, const DiscreteKey &key2) │ │ │ │ -Create a list from two keys. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.cpp:46 │ │ │ │ -_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_:_:_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_:_:_u_n_z_i_p │ │ │ │ +std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > unzip(const │ │ │ │ +DecisionTree< L, std::pair< T1, T2 > > &input) │ │ │ │ +unzip a DecisionTree with std::pair values. │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:440 │ │ │ │ +_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_:_:_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_:_:_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_K_e_y_s_:_:_o_p_e_r_a_t_o_r_& │ │ │ │ -DiscreteKeys & operator&(const DiscreteKey &key) │ │ │ │ -Add a key (non-const!) │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:70 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys() │ │ │ │ -Constructor for serialization. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:45 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys(const DiscreteKey &key) │ │ │ │ -Construct from a key. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:48 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys(const std::vector< DiscreteKey > &keys) │ │ │ │ -Construct from a vector of keys. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:56 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y_s_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -DiscreteKeys(std::map< Key, size_t > cardinalities) │ │ │ │ -Construct from cardinalities. │ │ │ │ -DDeeffiinniittiioonn DiscreteKey.h:51 │ │ │ │ +_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_:_:_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 │ │ │ │ +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_h_o_o_s_e │ │ │ │ +DecisionTree choose(const L &label, size_t index) const │ │ │ │ +create a new function where value(label)==index It's like "restrict" in │ │ │ │ +Darwiche09book pg329,... │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:358 │ │ │ │ +_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_o_m_b_i_n_e │ │ │ │ +DecisionTree combine(const LabelC &labelC, const Binary &op) const │ │ │ │ +combine with LabelC for convenience │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:368 │ │ │ │ +_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_:_:_~_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ +virtual ~DecisionTree()=default │ │ │ │ +Make virtual. │ │ │ │ +_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_D_e_f_a_u_l_t_C_o_m_p_a_r_e │ │ │ │ +static bool DefaultCompare(const Y &a, const Y &b) │ │ │ │ +Default method for comparison of two objects of type Y. │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:64 │ │ │ │ +_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_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_N_o_d_e_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:135 │ │ │ │ * _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 │ │ │ │ + * _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/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/DiscreteFactorGraph.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,51 +94,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs
│ │ │ -
DiscreteJunctionTree.h File Reference
│ │ │ +Functions
│ │ │ +
DiscreteFactorGraph.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:
 

│ │ │ +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
Mar 29, 2013
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │
│ │ │ -Richard Roberts
│ │ │ +Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 | _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 | _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. │ │ │ │   │ │ │ │ -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: │ │ │ │ +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 │ │ │ │ - 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_._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/a00206.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ var a00206 = [ │ │ │ │ - ["DiscreteCluster", "a00206.html#aa8c26fa5afbbfd23795d7d421e543a81", null] │ │ │ │ + ["EliminateDiscrete", "a00206.html#ga6996e9c84467350b071645649231223a", null], │ │ │ │ + ["EliminateForMPE", "a00206.html#ga9bd0b2859a7513198a369f5de3c8cde3", null] │ │ │ │ ]; │ │ ├── ./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/DecisionTreeFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
DiscreteJunctionTree.cpp File Reference
│ │ │ +
DecisionTreeFactor.h File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

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.
 
│ │ │

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,28 @@ │ │ │ │ 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 │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** 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_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/a00212.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactorGraph.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,58 +94,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteFactorGraph.h File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteLookupDAG.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

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

│ │ │
Date
Feb 14, 2011
│ │ │
Author
Duy-Nguyen Ta
│ │ │
│ │ │ Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,45 +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 | _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_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +DiscreteLookupDAG.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_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 ********** │ │ │ │ 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_G_r_a_p_h_._h │ │ │ │ + * _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/a00215.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactorGraph.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,44 +94,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteFactorGraph.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteBayesTree.cpp File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

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

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

│ │ │ 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
│ │ │ +

Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

│ │ │ +

DiscreteBayesTree

Author
Frank Dellaert
│ │ │
│ │ │ -Frank Dellaert
│ │ │ +Richard Roberts
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,22 @@ │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +DiscreteBayesTree │ │ │ │ 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_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ + * _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/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/DiscreteLookupDAG.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,51 +95,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteFactor.h File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteLookupDAG.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...
class  gtsam::DiscreteLookupTable
 DiscreteLookupTable table for max-product. More...
 
struct  gtsam::traits< DiscreteFactor >
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

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

Detailed Description

│ │ │ -
Date
Feb 14, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +
Date
January, 2022
│ │ │ +
Author
Frank dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +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 | _F_u_n_c_t_i_o_n_s │ │ │ │ -DiscreteFactor.h File Reference │ │ │ │ +_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_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_._._. │ │ │ │ + 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_._._. │ │ │ │   │ │ │ │ -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_ _> │ │ │ │ + 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_ _> │ │ │ │   │ │ │ │ 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 │ │ │ │ - Feb 14, 2011 │ │ │ │ + January, 2022 │ │ │ │ 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_F_a_c_t_o_r_._h │ │ │ │ + * _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_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/a00218.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00218 = [ │ │ │ │ - ["gtsam::traits< DiscreteFactor >", "a02856.html", null], │ │ │ │ - ["expNormalize", "a00218.html#ae1c1177c8725296b34601409322400ea", null] │ │ │ │ + ["gtsam::DiscreteLookupDAG", "a02888.html", "a02888"], │ │ │ │ + ["gtsam::traits< DiscreteLookupDAG >", "a02892.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00218_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactor.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteLookupDAG.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,143 +98,135 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteFactor.h
│ │ │ +
DiscreteLookupDAG.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
│ │ │ - │ │ │ - │ │ │ -
23#include <gtsam/base/Testable.h>
│ │ │ -
24
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
23
│ │ │ +
24#include <boost/shared_ptr.hpp>
│ │ │
25#include <string>
│ │ │ -
26namespace gtsam {
│ │ │ -
27
│ │ │ -
28class DecisionTreeFactor;
│ │ │ -
29class DiscreteConditional;
│ │ │ -
30class HybridValues;
│ │ │ -
31
│ │ │ -
│ │ │ -
38class GTSAM_EXPORT DiscreteFactor: public Factor {
│ │ │ -
39
│ │ │ -
40public:
│ │ │ -
41
│ │ │ -
42 // typedefs needed to play nice with gtsam
│ │ │ - │ │ │ -
44 typedef boost::shared_ptr<DiscreteFactor> shared_ptr;
│ │ │ -
45 typedef Factor Base;
│ │ │ -
46
│ │ │ - │ │ │ -
48
│ │ │ -
49public:
│ │ │ -
50
│ │ │ -
53
│ │ │ - │ │ │ +
26#include <utility>
│ │ │ +
27#include <vector>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │ +
30
│ │ │ +
31class DiscreteBayesNet;
│ │ │ +
32
│ │ │ +
│ │ │ +
40class GTSAM_EXPORT DiscreteLookupTable : public DiscreteConditional {
│ │ │ +
41 public:
│ │ │ + │ │ │ +
43 using shared_ptr = boost::shared_ptr<This>;
│ │ │ +
44 using BaseConditional = Conditional<DecisionTreeFactor, This>;
│ │ │ +
45
│ │ │ +
│ │ │ +
53 DiscreteLookupTable(size_t nFrontals, const DiscreteKeys& keys,
│ │ │ +
54 const ADT& potentials)
│ │ │ +
55 : DiscreteConditional(nFrontals, keys, potentials) {}
│ │ │ +
│ │ │
56
│ │ │ -
59 template<typename CONTAINER>
│ │ │ -
60 DiscreteFactor(const CONTAINER& keys) : Base(keys) {}
│ │ │ +
58 void print(
│ │ │ +
59 const std::string& s = "Discrete Lookup Table: ",
│ │ │ +
60 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │
61
│ │ │ -
│ │ │ -
63 virtual ~DiscreteFactor() {
│ │ │ -
64 }
│ │ │ -
│ │ │ -
65
│ │ │ -
69
│ │ │ -
71 virtual bool equals(const DiscreteFactor& lf, double tol = 1e-9) const = 0;
│ │ │ -
72
│ │ │ -
│ │ │ -
74 void print(
│ │ │ -
75 const std::string& s = "DiscreteFactor\n",
│ │ │ -
76 const KeyFormatter& formatter = DefaultKeyFormatter) const override {
│ │ │ -
77 Base::print(s, formatter);
│ │ │ -
78 }
│ │ │ -
│ │ │ -
79
│ │ │ -
83
│ │ │ -
85 virtual double operator()(const DiscreteValues&) const = 0;
│ │ │ -
86
│ │ │ -
88 double error(const DiscreteValues& values) const;
│ │ │ -
89
│ │ │ -
94 double error(const HybridValues& c) const override;
│ │ │ -
95
│ │ │ - │ │ │ -
98
│ │ │ -
99 virtual DecisionTreeFactor toDecisionTreeFactor() const = 0;
│ │ │ -
100
│ │ │ -
104
│ │ │ - │ │ │ +
67 size_t argmax(const DiscreteValues& parentsValues) const;
│ │ │ +
68
│ │ │ +
73 void argmaxInPlace(DiscreteValues* parentsValues) const;
│ │ │ +
74};
│ │ │ +
│ │ │ +
75
│ │ │ +
│ │ │ +
77class GTSAM_EXPORT DiscreteLookupDAG : public BayesNet<DiscreteLookupTable> {
│ │ │ +
78 public:
│ │ │ + │ │ │ +
80 using This = DiscreteLookupDAG;
│ │ │ +
81 using shared_ptr = boost::shared_ptr<This>;
│ │ │ +
82
│ │ │ +
85
│ │ │ + │ │ │ +
88
│ │ │ +
90 static DiscreteLookupDAG FromBayesNet(const DiscreteBayesNet& bayesNet);
│ │ │ +
91
│ │ │ +
93 virtual ~DiscreteLookupDAG() {}
│ │ │ +
94
│ │ │ +
96
│ │ │ +
99
│ │ │ +
101 bool equals(const This& bn, double tol = 1e-9) const;
│ │ │ +
102
│ │ │ +
104
│ │ │
107
│ │ │ -
115 virtual std::string markdown(
│ │ │ -
116 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ -
117 const Names& names = {}) const = 0;
│ │ │ -
118
│ │ │ -
126 virtual std::string html(
│ │ │ -
127 const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ -
128 const Names& names = {}) const = 0;
│ │ │ -
129
│ │ │ -
131};
│ │ │ -
│ │ │ -
132// DiscreteFactor
│ │ │ -
133
│ │ │ -
134// traits
│ │ │ -
135template<> struct traits<DiscreteFactor> : public Testable<DiscreteFactor> {};
│ │ │ +
109 template <typename... Args>
│ │ │ +
│ │ │ +
110 void add(Args&&... args) {
│ │ │ +
111 emplace_shared<DiscreteLookupTable>(std::forward<Args>(args)...);
│ │ │ +
112 }
│ │ │ +
│ │ │ +
113
│ │ │ +
125 DiscreteValues argmax(DiscreteValues given = DiscreteValues()) const;
│ │ │ +
127
│ │ │ +
128 private:
│ │ │ +
130 friend class boost::serialization::access;
│ │ │ +
131 template <class ARCHIVE>
│ │ │ +
132 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ +
133 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
134 }
│ │ │ +
135};
│ │ │ +
│ │ │
136
│ │ │ -
137
│ │ │ -
154std::vector<double> expNormalize(const std::vector<double> &logProbs);
│ │ │ -
155
│ │ │ -
156
│ │ │ -
157}// namespace gtsam
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ - │ │ │ -
The base class for all factors.
│ │ │ +
137// traits
│ │ │ +
138template <>
│ │ │ +
139struct traits<DiscreteLookupDAG> : public Testable<DiscreteLookupDAG> {};
│ │ │ +
140
│ │ │ +
141} // namespace gtsam
│ │ │ + │ │ │ +
Bayes network.
│ │ │ +
Factor Graph Base Class.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
std::vector< double > expNormalize(const std::vector< double > &logProbs)
Normalize a set of log probabilities.
Definition DiscreteFactor.cpp:42
│ │ │ +
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
│ │ │ -
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition DiscreteFactor.h:38
│ │ │ -
virtual std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0
Render as html table.
│ │ │ -
Factor Base
Our base class.
Definition DiscreteFactor.h:45
│ │ │ -
void print(const std::string &s="DiscreteFactor\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
Definition DiscreteFactor.h:74
│ │ │ -
boost::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
Definition DiscreteFactor.h:44
│ │ │ -
virtual ~DiscreteFactor()
Virtual destructor.
Definition DiscreteFactor.h:63
│ │ │ -
DiscreteValues::Names Names
Translation table from values to strings.
Definition DiscreteFactor.h:106
│ │ │ -
virtual bool equals(const DiscreteFactor &lf, double tol=1e-9) const =0
equals
│ │ │ -
DiscreteFactor This
This class.
Definition DiscreteFactor.h:43
│ │ │ -
virtual DecisionTreeFactor operator*(const DecisionTreeFactor &) const =0
Multiply in a DecisionTreeFactor and return the result as DecisionTreeFactor.
│ │ │ -
virtual double operator()(const DiscreteValues &) const =0
Find value for given assignment of values to variables.
│ │ │ -
virtual std::string markdown(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0
Render as markdown table.
│ │ │ -
DiscreteFactor(const CONTAINER &keys)
Construct from container of keys.
Definition DiscreteFactor.h:60
│ │ │ -
DiscreteFactor()
Default constructor creates empty factor.
Definition DiscreteFactor.h:55
│ │ │ + │ │ │ +
A Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
│ │ │ +
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ +
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ +
DiscreteLookupTable table for max-product.
Definition DiscreteLookupDAG.h:40
│ │ │ +
DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT &potentials)
Construct a new Discrete Lookup Table object.
Definition DiscreteLookupDAG.h:53
│ │ │ +
A DAG made from lookup tables, as defined above.
Definition DiscreteLookupDAG.h:77
│ │ │ +
bool equals(const This &bn, double tol=1e-9) const
Check equality.
│ │ │ +
DiscreteLookupDAG()
Construct empty DAG.
Definition DiscreteLookupDAG.h:87
│ │ │ +
void add(Args &&... args)
Add a DiscreteLookupTable.
Definition DiscreteLookupDAG.h:110
│ │ │ +
virtual ~DiscreteLookupDAG()
Destructor.
Definition DiscreteLookupDAG.h:93
│ │ │
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ -
std::map< Key, std::vector< std::string > > Names
Translation table from values to strings.
Definition DiscreteValues.h:95
│ │ │ -
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ -
Definition Factor.h:68
│ │ │ -
the error.
│ │ │ +
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ +
Definition Conditional.h:64
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,196 +1,164 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteFactor.h │ │ │ │ +DiscreteLookupDAG.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_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -24 │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_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> │ │ │ │ +21#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +23 │ │ │ │ +24#include │ │ │ │ 25#include │ │ │ │ -26namespace _g_t_s_a_m { │ │ │ │ -27 │ │ │ │ -28class DecisionTreeFactor; │ │ │ │ -29class DiscreteConditional; │ │ │ │ -30class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ -31 │ │ │ │ -_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_F_a_c_t_o_r: public _F_a_c_t_o_r { │ │ │ │ -39 │ │ │ │ -40public: │ │ │ │ -41 │ │ │ │ -42 // typedefs needed to play nice with gtsam │ │ │ │ -_4_3 typedef _D_i_s_c_r_e_t_e_F_a_c_t_o_r _T_h_i_s; │ │ │ │ -_4_4 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ -_4_5 typedef _F_a_c_t_o_r _B_a_s_e; │ │ │ │ -46 │ │ │ │ -_4_7 using _V_a_l_u_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ -48 │ │ │ │ -49public: │ │ │ │ -50 │ │ │ │ -53 │ │ │ │ -_5_5 _D_i_s_c_r_e_t_e_F_a_c_t_o_r() {} │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ +30 │ │ │ │ +31class DiscreteBayesNet; │ │ │ │ +32 │ │ │ │ +_4_0class GTSAM_EXPORT _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e : public _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ +41 public: │ │ │ │ +42 using _T_h_i_s = _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e; │ │ │ │ +43 using shared_ptr = boost::shared_ptr; │ │ │ │ +44 using BaseConditional = _C_o_n_d_i_t_i_o_n_a_l_<_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_,_ _T_h_i_s_>; │ │ │ │ +45 │ │ │ │ +_5_3 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e(size_t nFrontals, const _D_i_s_c_r_e_t_e_K_e_y_s& keys, │ │ │ │ +54 const _A_D_T& potentials) │ │ │ │ +55 : _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l(nFrontals, keys, potentials) {} │ │ │ │ 56 │ │ │ │ -59 template │ │ │ │ -_6_0 _D_i_s_c_r_e_t_e_F_a_c_t_o_r(const CONTAINER& keys) : _B_a_s_e(keys) {} │ │ │ │ +58 void _p_r_i_n_t( │ │ │ │ +59 const std::string& s = "Discrete Lookup Table: ", │ │ │ │ +60 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override; │ │ │ │ 61 │ │ │ │ -_6_3 virtual _~_D_i_s_c_r_e_t_e_F_a_c_t_o_r() { │ │ │ │ -64 } │ │ │ │ -65 │ │ │ │ -69 │ │ │ │ -_7_1 virtual bool _e_q_u_a_l_s(const _D_i_s_c_r_e_t_e_F_a_c_t_o_r& lf, double tol = 1e-9) const = 0; │ │ │ │ -72 │ │ │ │ -_7_4 void _p_r_i_n_t( │ │ │ │ -75 const std::string& s = "DiscreteFactor\n", │ │ │ │ -76 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override { │ │ │ │ -77 Base::print(s, formatter); │ │ │ │ -78 } │ │ │ │ -79 │ │ │ │ -83 │ │ │ │ -_8_5 virtual double _o_p_e_r_a_t_o_r_(_)(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s&) const = 0; │ │ │ │ -86 │ │ │ │ -88 double error(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ -89 │ │ │ │ -94 double error(const _H_y_b_r_i_d_V_a_l_u_e_s& c) const override; │ │ │ │ -95 │ │ │ │ -_9_7 virtual _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&) const = 0; │ │ │ │ -98 │ │ │ │ -99 virtual _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r toDecisionTreeFactor() const = 0; │ │ │ │ -100 │ │ │ │ +67 size_t argmax(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& parentsValues) const; │ │ │ │ +68 │ │ │ │ +73 void argmaxInPlace(_D_i_s_c_r_e_t_e_V_a_l_u_e_s* parentsValues) const; │ │ │ │ +74}; │ │ │ │ +75 │ │ │ │ +_7_7class GTSAM_EXPORT _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G : public _B_a_y_e_s_N_e_t { │ │ │ │ +78 public: │ │ │ │ +79 using _B_a_s_e = _B_a_y_e_s_N_e_t_<_D_i_s_c_r_e_t_e_L_o_o_k_u_p_T_a_b_l_e_>; │ │ │ │ +80 using _T_h_i_s = _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G; │ │ │ │ +81 using shared_ptr = boost::shared_ptr; │ │ │ │ +82 │ │ │ │ +85 │ │ │ │ +_8_7 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G() {} │ │ │ │ +88 │ │ │ │ +90 static _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G FromBayesNet(const _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t& bayesNet); │ │ │ │ +91 │ │ │ │ +_9_3 virtual _~_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G() {} │ │ │ │ +94 │ │ │ │ +96 │ │ │ │ +99 │ │ │ │ +_1_0_1 bool _e_q_u_a_l_s(const _T_h_i_s& bn, double tol = 1e-9) const; │ │ │ │ +102 │ │ │ │ 104 │ │ │ │ -_1_0_6 using _N_a_m_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_N_a_m_e_s; │ │ │ │ 107 │ │ │ │ -_1_1_5 virtual std::string _m_a_r_k_d_o_w_n( │ │ │ │ -116 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ -117 const _N_a_m_e_s& names = {}) const = 0; │ │ │ │ -118 │ │ │ │ -_1_2_6 virtual std::string _h_t_m_l( │ │ │ │ -127 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter, │ │ │ │ -128 const _N_a_m_e_s& names = {}) const = 0; │ │ │ │ -129 │ │ │ │ -131}; │ │ │ │ -132// DiscreteFactor │ │ │ │ -133 │ │ │ │ -134// traits │ │ │ │ -_1_3_5template<> struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_F_a_c_t_o_r> : public _T_e_s_t_a_b_l_e │ │ │ │ -{}; │ │ │ │ +109 template │ │ │ │ +_1_1_0 void _a_d_d(Args&&... args) { │ │ │ │ +111 emplace_shared(std::forward(args)...); │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +125 _D_i_s_c_r_e_t_e_V_a_l_u_e_s argmax(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given = _D_i_s_c_r_e_t_e_V_a_l_u_e_s()) const; │ │ │ │ +127 │ │ │ │ +128 private: │ │ │ │ +_1_3_0 friend class boost::serialization::access; │ │ │ │ +131 template │ │ │ │ +132 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ +133 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ +134 } │ │ │ │ +135}; │ │ │ │ 136 │ │ │ │ -137 │ │ │ │ -154std::vector _e_x_p_N_o_r_m_a_l_i_z_e(const std::vector &logProbs); │ │ │ │ -155 │ │ │ │ -156 │ │ │ │ -157}// namespace gtsam │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ -_F_a_c_t_o_r_._h │ │ │ │ -The base class for all factors. │ │ │ │ +137// traits │ │ │ │ +138template <> │ │ │ │ +_1_3_9struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +140 │ │ │ │ +141} // namespace gtsam │ │ │ │ +_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ +_B_a_y_e_s_N_e_t_._h │ │ │ │ +Bayes network. │ │ │ │ +_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor Graph Base Class. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_e_x_p_N_o_r_m_a_l_i_z_e │ │ │ │ -std::vector< double > expNormalize(const std::vector< double > &logProbs) │ │ │ │ -Normalize a set of log probabilities. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.cpp:42 │ │ │ │ +_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_:_:_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_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_F_a_c_t_o_r_:_:_h_t_m_l │ │ │ │ -virtual std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, │ │ │ │ -const Names &names={}) const =0 │ │ │ │ -Render as html table. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_B_a_s_e │ │ │ │ -Factor Base │ │ │ │ -Our base class. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:45 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="DiscreteFactor\n", const KeyFormatter │ │ │ │ -&formatter=DefaultKeyFormatter) const override │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:74 │ │ │ │ -_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_:_:_~_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ -virtual ~DiscreteFactor() │ │ │ │ -Virtual destructor. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:63 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_N_a_m_e_s │ │ │ │ -DiscreteValues::Names Names │ │ │ │ -Translation table from values to strings. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:106 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_e_q_u_a_l_s │ │ │ │ -virtual bool equals(const DiscreteFactor &lf, double tol=1e-9) const =0 │ │ │ │ -equals │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_T_h_i_s │ │ │ │ -DiscreteFactor This │ │ │ │ -This class. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:43 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -virtual DecisionTreeFactor operator*(const DecisionTreeFactor &) const =0 │ │ │ │ -Multiply in a DecisionTreeFactor and return the result as DecisionTreeFactor. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -virtual double operator()(const DiscreteValues &) const =0 │ │ │ │ -Find value for given assignment of values to variables. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_m_a_r_k_d_o_w_n │ │ │ │ -virtual std::string markdown(const KeyFormatter │ │ │ │ -&keyFormatter=DefaultKeyFormatter, const Names &names={}) const =0 │ │ │ │ -Render as markdown table. │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ -DiscreteFactor(const CONTAINER &keys) │ │ │ │ -Construct from container of keys. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:60 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r │ │ │ │ -DiscreteFactor() │ │ │ │ -Default constructor creates empty factor. │ │ │ │ -DDeeffiinniittiioonn DiscreteFactor.h:55 │ │ │ │ +_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_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ +A Bayes net made from discrete conditional distributions. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:38 │ │ │ │ +_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_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_L_o_o_k_u_p_T_a_b_l_e │ │ │ │ +DiscreteLookupTable table for max-product. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:40 │ │ │ │ +_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 │ │ │ │ +DiscreteLookupTable(size_t nFrontals, const DiscreteKeys &keys, const ADT │ │ │ │ +&potentials) │ │ │ │ +Construct a new Discrete Lookup Table object. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:53 │ │ │ │ +_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. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:77 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &bn, double tol=1e-9) const │ │ │ │ +Check equality. │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G │ │ │ │ +DiscreteLookupDAG() │ │ │ │ +Construct empty DAG. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:87 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_a_d_d │ │ │ │ +void add(Args &&... args) │ │ │ │ +Add a DiscreteLookupTable. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:110 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G_:_:_~_D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G │ │ │ │ +virtual ~DiscreteLookupDAG() │ │ │ │ +Destructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:93 │ │ │ │ _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_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_:_:_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_:_:_F_a_c_t_o_r │ │ │ │ -DDeeffiinniittiioonn Factor.h:68 │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -the error. │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_N_e_t │ │ │ │ +A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ +DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ * _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_L_o_o_k_u_p_D_A_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/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/Signature.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,83 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
DiscreteFactor.cpp File Reference
│ │ │ +Typedefs | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
Signature.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

discrete factor │ │ │ +

signatures for conditional densities │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ +Typedefs

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

│ │ │ Functions

std::vector< double > gtsam::expNormalize (const std::vector< double > &logProbs)
 Normalize a set of log probabilities.
 
│ │ │ +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

│ │ │ -

discrete factor

│ │ │ -
Date
Feb 14, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +

signatures for conditional densities

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
Feb 27, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,57 @@ │ │ │ │ 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_._._. │ │ │ │ +_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 │ │ │ │ -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. │ │ │ │ +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 ********** │ │ │ │ -discrete factor │ │ │ │ - Date │ │ │ │ - Feb 14, 2011 │ │ │ │ +signatures for conditional densities │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ 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_F_a_c_t_o_r_._c_p_p │ │ │ │ + * _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/a00221.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ var a00221 = [ │ │ │ │ - ["expNormalize", "a00221.html#ae1c1177c8725296b34601409322400ea", null] │ │ │ │ + ["operator%", "a00221.html#ae4856250df52ce4b9b4b16c7a833408c", null], │ │ │ │ + ["operator%", "a00221.html#ab98cf2a4777006c28d6983db5d8ec574", null], │ │ │ │ + ["operator|", "a00221.html#aa6c58dfb2fc9398a026e3268ba2edfad", 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/Assignment.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,41 +96,43 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
DiscreteEliminationTree.h File Reference
│ │ │ +
Assignment.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

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

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::DiscreteEliminationTree
 Elimination tree for discrete factors. 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.
 
│ │ │

Detailed Description

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

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

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
Feb 5, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +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 │ │ │ │ -DiscreteEliminationTree.h File Reference │ │ │ │ +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_:_:_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_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 29, 2013 │ │ │ │ +An assignment from labels to a discrete value index (size_t) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Date │ │ │ │ + Feb 5, 2012 │ │ │ │ * _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 │ │ │ │ + * _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/a00224_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/Assignment.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteEliminationTree.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
│ │ │ @@ -114,62 +114,94 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
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
│ │ │ - │ │ │ -
48 const VariableIndex& structure, const Ordering& order);
│ │ │ -
49
│ │ │ - │ │ │ -
56 const Ordering& order);
│ │ │ -
57
│ │ │ -
59 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ +
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 private:
│ │ │ -
62
│ │ │ -
63 friend class ::EliminationTreeTester;
│ │ │ -
64
│ │ │ -
65 };
│ │ │ -
│ │ │ -
66
│ │ │ -
67}
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
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 }
│ │ │ +
│ │ │ +
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
│ │ │
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
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 VariableIndex class computes and stores the block column structure of a factor graph.
Definition VariableIndex.h:43
│ │ │ +
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 │ │ │ │ -DiscreteEliminationTree.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 │ │ │ │ @@ -16,76 +16,96 @@ │ │ │ │ 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_/_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 │ │ │ │ -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; │ │ │ │ +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 private: │ │ │ │ -62 │ │ │ │ -63 friend class ::EliminationTreeTester; │ │ │ │ -64 │ │ │ │ -65 }; │ │ │ │ -66 │ │ │ │ -67} │ │ │ │ -_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 │ │ │ │ -_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ +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 │ │ │ │ +_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_:_:_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 │ │ │ │ -_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_:_:_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 │ │ │ │ - * _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_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/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/DiscreteKey.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,62 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
DiscreteEliminationTree.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
DiscreteKey.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

specialized key for discrete variables │ │ │ +More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

struct  gtsam::DiscreteKeys
 DiscreteKeys is a set of keys that can be assembled using the & operator. More...
 
struct  gtsam::traits< DiscreteKeys >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Typedefs

using gtsam::DiscreteKey = std::pair< Key, size_t >
 Key type for discrete variables.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +DiscreteKeys gtsam::operator& (const DiscreteKey &key1, const DiscreteKey &key2)
 Create a list from two keys.
 
│ │ │

Detailed Description

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

specialized key for discrete variables

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
Feb 28, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,39 @@ │ │ │ │ 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 | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +DiscreteKey.h File Reference │ │ │ │ +specialized key for discrete variables _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_:_:_D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ +  _D_i_s_c_r_e_t_e_K_e_y_s is a set of keys that can be assembled using the & │ │ │ │ + operator. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _D_i_s_c_r_e_t_e_K_e_y_s_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  _g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_K_e_y = std::pair< _K_e_y, size_t > │ │ │ │ +  Key type for discrete variables. │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::ooppeerraattoorr&& (const _D_i_s_c_r_e_t_e_K_e_y &key1, const _D_i_s_c_r_e_t_e_K_e_y │ │ │ │ + &key2) │ │ │ │ +  Create a list from two keys. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 29, 2013 │ │ │ │ +specialized key for discrete variables │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Date │ │ │ │ + Feb 28, 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 │ │ │ │ + * _D_i_s_c_r_e_t_e_K_e_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/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/DiscreteFactorGraph.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,42 +95,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
DiscreteDistribution.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
DiscreteFactorGraph.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::EliminationTraits< DiscreteFactorGraph >
 
struct  gtsam::traits< DiscreteDistribution >
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

│ │ │ -
Date
December 2021
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,45 @@ │ │ │ │ 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 │ │ │ │ +_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 │ │ │ │ - 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_:_:_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_ _> │ │ │ │   │ │ │ │ -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_ _> │ │ │ │ + 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 ********** │ │ │ │ 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_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/a00230.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00230 = [ │ │ │ │ - ["gtsam::traits< DiscreteDistribution >", "a02844.html", null] │ │ │ │ + ["gtsam::EliminationTraits< DiscreteFactorGraph >", "a02860.html", "a02860"], │ │ │ │ + ["gtsam::traits< DiscreteFactorGraph >", "a02868.html", null], │ │ │ │ + ["EliminateDiscrete", "a00230.html#ga6996e9c84467350b071645649231223a", null], │ │ │ │ + ["EliminateForMPE", "a00230.html#ga9bd0b2859a7513198a369f5de3c8cde3", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00230_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteDistribution.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteFactorGraph.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,105 +98,233 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteDistribution.h
│ │ │ +
DiscreteFactorGraph.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
│ │ │ -
22#include <string>
│ │ │ -
23#include <vector>
│ │ │ -
24
│ │ │ -
25namespace gtsam {
│ │ │ -
26
│ │ │ -
│ │ │ -
33class GTSAM_EXPORT DiscreteDistribution : public DiscreteConditional {
│ │ │ -
34 public:
│ │ │ - │ │ │ -
36
│ │ │ -
39
│ │ │ - │ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
26#include <gtsam/base/FastSet.h>
│ │ │ +
27
│ │ │ +
28#include <boost/make_shared.hpp>
│ │ │ +
29#include <string>
│ │ │ +
30#include <utility>
│ │ │ +
31#include <vector>
│ │ │ +
32
│ │ │ +
33namespace gtsam {
│ │ │ +
34
│ │ │ +
35// Forward declarations
│ │ │ +
36class DiscreteFactorGraph;
│ │ │ +
37class DiscreteConditional;
│ │ │ +
38class DiscreteBayesNet;
│ │ │ +
39class DiscreteEliminationTree;
│ │ │ +
40class DiscreteBayesTree;
│ │ │ +
41class DiscreteJunctionTree;
│ │ │
42
│ │ │ -
│ │ │ - │ │ │ -
45 : Base(f.size(), f) {}
│ │ │ -
│ │ │ -
46
│ │ │ -
52 explicit DiscreteDistribution(const Signature& s) : Base(s) {}
│ │ │ -
53
│ │ │ -
│ │ │ -
60 DiscreteDistribution(const DiscreteKey& key, const std::vector<double>& spec)
│ │ │ -
61 : DiscreteDistribution(Signature(key, {}, Signature::Table{spec})) {}
│ │ │ -
│ │ │ -
62
│ │ │ -
│ │ │ -
69 DiscreteDistribution(const DiscreteKey& key, const std::string& spec)
│ │ │ -
70 : DiscreteDistribution(Signature(key, {}, spec)) {}
│ │ │ -
│ │ │ -
71
│ │ │ -
75
│ │ │ -
77 void print(
│ │ │ -
78 const std::string& s = "Discrete Prior: ",
│ │ │ -
79 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │ -
80
│ │ │ -
84
│ │ │ -
86 double operator()(size_t value) const;
│ │ │ -
87
│ │ │ -
89 // TODO(dellaert): does not play well with wrapper!
│ │ │ -
90 // using Base::operator();
│ │ │ -
91
│ │ │ -
93 std::vector<double> pmf() const;
│ │ │ -
94
│ │ │ -
96#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
99 size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); }
│ │ │ -
101#endif
│ │ │ -
102};
│ │ │ -
│ │ │ -
103// DiscreteDistribution
│ │ │ -
104
│ │ │ -
105// traits
│ │ │ -
106template <>
│ │ │ -
107struct traits<DiscreteDistribution> : public Testable<DiscreteDistribution> {};
│ │ │ +
51GTSAM_EXPORT
│ │ │ +
52std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr>
│ │ │ +
53EliminateDiscrete(const DiscreteFactorGraph& factors,
│ │ │ +
54 const Ordering& frontalKeys);
│ │ │ +
55
│ │ │ +
64GTSAM_EXPORT
│ │ │ +
65std::pair<DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr>
│ │ │ +
66EliminateForMPE(const DiscreteFactorGraph& factors,
│ │ │ +
67 const Ordering& frontalKeys);
│ │ │ +
68
│ │ │ +
│ │ │ + │ │ │ +
70{
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
78
│ │ │ +
80 static std::pair<boost::shared_ptr<ConditionalType>,
│ │ │ +
81 boost::shared_ptr<FactorType> >
│ │ │ +
│ │ │ +
82 DefaultEliminate(const FactorGraphType& factors, const Ordering& keys) {
│ │ │ +
83 return EliminateDiscrete(factors, keys);
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
│ │ │ + │ │ │ +
88 const FactorGraphType& graph,
│ │ │ +
89 boost::optional<const VariableIndex&> variableIndex) {
│ │ │ +
90 return Ordering::Colamd(*variableIndex);
│ │ │ +
91 }
│ │ │ +
│ │ │ +
92};
│ │ │ +
│ │ │ +
93
│ │ │ +
│ │ │ +
99class GTSAM_EXPORT DiscreteFactorGraph
│ │ │ +
100 : public FactorGraph<DiscreteFactor>,
│ │ │ +
101 public EliminateableFactorGraph<DiscreteFactorGraph> {
│ │ │ +
102 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
107 using shared_ptr = boost::shared_ptr<This>;
│ │ │
108
│ │ │ -
109} // namespace gtsam
│ │ │ - │ │ │ -
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │ + │ │ │ +
110
│ │ │ +
111 using Indices = KeyVector;
│ │ │ +
112
│ │ │ + │ │ │ +
115
│ │ │ +
117 template <typename ITERATOR>
│ │ │ +
│ │ │ +
118 DiscreteFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor)
│ │ │ +
119 : Base(firstFactor, lastFactor) {}
│ │ │ +
│ │ │ +
120
│ │ │ +
122 template <class CONTAINER>
│ │ │ +
123 explicit DiscreteFactorGraph(const CONTAINER& factors) : Base(factors) {}
│ │ │ +
124
│ │ │ +
127 template <class DERIVED_FACTOR>
│ │ │ + │ │ │ +
129
│ │ │ + │ │ │ +
132
│ │ │ +
135
│ │ │ +
136 bool equals(const This& fg, double tol = 1e-9) const;
│ │ │ +
137
│ │ │ +
139
│ │ │ +
141 template <typename... Args>
│ │ │ +
│ │ │ +
142 void add(Args&&... args) {
│ │ │ +
143 emplace_shared<DecisionTreeFactor>(std::forward<Args>(args)...);
│ │ │ +
144 }
│ │ │ +
│ │ │ +
145
│ │ │ +
147 KeySet keys() const;
│ │ │ +
148
│ │ │ +
150 DiscreteKeys discreteKeys() const;
│ │ │ +
151
│ │ │ +
153 DecisionTreeFactor product() const;
│ │ │ +
154
│ │ │ +
159 double operator()(const DiscreteValues& values) const;
│ │ │ +
160
│ │ │ +
162 void print(
│ │ │ +
163 const std::string& s = "DiscreteFactorGraph",
│ │ │ +
164 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │ +
165
│ │ │ +
172 DiscreteBayesNet sumProduct(
│ │ │ +
173 OptionalOrderingType orderingType = boost::none) const;
│ │ │ +
174
│ │ │ +
181 DiscreteBayesNet sumProduct(const Ordering& ordering) const;
│ │ │ +
182
│ │ │ +
189 DiscreteLookupDAG maxProduct(
│ │ │ +
190 OptionalOrderingType orderingType = boost::none) const;
│ │ │ +
191
│ │ │ +
198 DiscreteLookupDAG maxProduct(const Ordering& ordering) const;
│ │ │ +
199
│ │ │ + │ │ │ +
207 OptionalOrderingType orderingType = boost::none) const;
│ │ │ +
208
│ │ │ +
215 DiscreteValues optimize(const Ordering& ordering) const;
│ │ │ +
216
│ │ │ +
219
│ │ │ +
227 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
228 const DiscreteFactor::Names& names = {}) const;
│ │ │ +
229
│ │ │ +
237 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ +
238 const DiscreteFactor::Names& names = {}) const;
│ │ │ +
239
│ │ │ +
243
│ │ │ +
244 using Base::error; // Expose error(const HybridValues&) method..
│ │ │ +
245
│ │ │ +
247}; // \ DiscreteFactorGraph
│ │ │ +
│ │ │ +
248
│ │ │ +
250template <>
│ │ │ +
251struct traits<DiscreteFactorGraph> : public Testable<DiscreteFactorGraph> {};
│ │ │ +
252
│ │ │ +
253} // namespace gtsam
│ │ │ +
A thin wrapper around std::set that uses boost's fast_pool_allocator.
│ │ │ + │ │ │ + │ │ │ +
Variable ordering for the elimination algorithm.
│ │ │ +
Factor Graph Base Class.
│ │ │ +
Variable elimination algorithms for factor graphs.
│ │ │ +
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for DiscreteFactorGraph.
Definition DiscreteFactorGraph.cpp:200
│ │ │ +
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateForMPE(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Alternate elimination function for that creates non-normalized lookup tables.
Definition DiscreteFactorGraph.cpp:116
│ │ │
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
│ │ │ +
string markdown(const DiscreteValues &values, const KeyFormatter &keyFormatter, const DiscreteValues::Names &names)
Free version of markdown.
Definition DiscreteValues.cpp:129
│ │ │ +
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │ +
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
│ │ │ + │ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │
A discrete probabilistic factor.
Definition DecisionTreeFactor.h:45
│ │ │ +
A Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
│ │ │ +
A Bayes tree representing a Discrete density.
Definition DiscreteBayesTree.h:75
│ │ │
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ -
A prior probability on a set of discrete variables.
Definition DiscreteDistribution.h:33
│ │ │ -
DiscreteDistribution(const Signature &s)
Construct from a Signature.
Definition DiscreteDistribution.h:52
│ │ │ -
DiscreteDistribution(const DiscreteKey &key, const std::vector< double > &spec)
Construct from key and a vector of floats specifying the probability mass function (PMF).
Definition DiscreteDistribution.h:60
│ │ │ -
DiscreteDistribution(const DiscreteKey &key, const std::string &spec)
Construct from key and a string specifying the probability mass function (PMF).
Definition DiscreteDistribution.h:69
│ │ │ -
DiscreteDistribution()
Default constructor needed for serialization.
Definition DiscreteDistribution.h:41
│ │ │ -
DiscreteDistribution(const DecisionTreeFactor &f)
Constructor from factor.
Definition DiscreteDistribution.h:44
│ │ │ -
Signature for a discrete conditional density, used to construct conditionals.
Definition Signature.h:54
│ │ │ +
Elimination tree for discrete factors.
Definition DiscreteEliminationTree.h:33
│ │ │ +
Base class for discrete probabilistic factors The most general one is the derived DecisionTreeFactor.
Definition DiscreteFactor.h:38
│ │ │ +
DiscreteValues::Names Names
Translation table from values to strings.
Definition DiscreteFactor.h:106
│ │ │ +
DiscreteFactorGraph FactorGraphType
Type of the factor graph (e.g. DiscreteFactorGraph)
Definition DiscreteFactorGraph.h:72
│ │ │ +
DiscreteJunctionTree JunctionTreeType
Type of Junction tree.
Definition DiscreteFactorGraph.h:77
│ │ │ +
DiscreteFactor FactorType
Type of factors in factor graph.
Definition DiscreteFactorGraph.h:71
│ │ │ +
static std::pair< boost::shared_ptr< ConditionalType >, boost::shared_ptr< FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering &keys)
The default dense elimination function.
Definition DiscreteFactorGraph.h:82
│ │ │ +
DiscreteBayesTree BayesTreeType
Type of Bayes tree.
Definition DiscreteFactorGraph.h:76
│ │ │ +
DiscreteBayesNet BayesNetType
Type of Bayes net from sequential elimination.
Definition DiscreteFactorGraph.h:74
│ │ │ +
DiscreteConditional ConditionalType
Type of conditionals from elimination.
Definition DiscreteFactorGraph.h:73
│ │ │ +
static Ordering DefaultOrderingFunc(const FactorGraphType &graph, boost::optional< const VariableIndex & > variableIndex)
The default ordering generation function.
Definition DiscreteFactorGraph.h:87
│ │ │ +
DiscreteEliminationTree EliminationTreeType
Type of elimination tree.
Definition DiscreteFactorGraph.h:75
│ │ │ +
A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
Definition DiscreteFactorGraph.h:101
│ │ │ +
DiscreteFactorGraph(const CONTAINER &factors)
Construct from container of factors (shared_ptr or plain objects)
Definition DiscreteFactorGraph.h:123
│ │ │ +
boost::shared_ptr< This > shared_ptr
shared_ptr to This
Definition DiscreteFactorGraph.h:107
│ │ │ +
DiscreteFactorGraph()
‍map from keys to values
Definition DiscreteFactorGraph.h:114
│ │ │ +
DiscreteFactorGraph(const FactorGraph< DERIVED_FACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition DiscreteFactorGraph.h:128
│ │ │ +
DiscreteFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor)
Construct from iterator over factors.
Definition DiscreteFactorGraph.h:118
│ │ │ +
virtual ~DiscreteFactorGraph()
Destructor.
Definition DiscreteFactorGraph.h:131
│ │ │ +
EliminateableFactorGraph< This > BaseEliminateable
for elimination
Definition DiscreteFactorGraph.h:106
│ │ │ +
void add(Args &&... args)
Add a decision-tree factor.
Definition DiscreteFactorGraph.h:142
│ │ │ +
An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree,...
Definition DiscreteJunctionTree.h:52
│ │ │ +
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ +
A DAG made from lookup tables, as defined above.
Definition DiscreteLookupDAG.h:77
│ │ │ +
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ +
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
Traits class for eliminateable factor graphs, specifies the types that result from elimination,...
Definition EliminateableFactorGraph.h:36
│ │ │ +
EliminateableFactorGraph is a base class for factor graphs that contains elimination algorithms.
Definition EliminateableFactorGraph.h:57
│ │ │ +
Definition Ordering.h:34
│ │ │ +
static Ordering Colamd(const FACTOR_GRAPH &graph)
Compute a fill-reducing ordering using COLAMD from a factor graph (see details for note on performanc...
Definition Ordering.h:95
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -us-ascii │ │ │ │ +utf-8 │ │ │ ├── html2text {} │ │ │ │ @@ -1,125 +1,352 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteDistribution.h │ │ │ │ +DiscreteFactorGraph.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_/_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> │ │ │ │ -21 │ │ │ │ -22#include │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -_3_3class GTSAM_EXPORT _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n : public _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ -34 public: │ │ │ │ -35 using _B_a_s_e = _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ -36 │ │ │ │ -39 │ │ │ │ -_4_1 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n() {} │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#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> │ │ │ │ +22#include <_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> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_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_/_O_r_d_e_r_i_n_g_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_S_e_t_._h> │ │ │ │ +27 │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30#include │ │ │ │ +31#include │ │ │ │ +32 │ │ │ │ +33namespace _g_t_s_a_m { │ │ │ │ +34 │ │ │ │ +35// Forward declarations │ │ │ │ +36class DiscreteFactorGraph; │ │ │ │ +37class DiscreteConditional; │ │ │ │ +38class DiscreteBayesNet; │ │ │ │ +39class DiscreteEliminationTree; │ │ │ │ +40class DiscreteBayesTree; │ │ │ │ +41class DiscreteJunctionTree; │ │ │ │ 42 │ │ │ │ -_4_4 explicit _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f) │ │ │ │ -45 : _B_a_s_e(f.size(), f) {} │ │ │ │ -46 │ │ │ │ -_5_2 explicit _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _S_i_g_n_a_t_u_r_e& s) : _B_a_s_e(s) {} │ │ │ │ -53 │ │ │ │ -_6_0 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::vector& │ │ │ │ -spec) │ │ │ │ -61 : _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(_S_i_g_n_a_t_u_r_e(key, {}, Signature::Table{spec})) {} │ │ │ │ -62 │ │ │ │ -_6_9 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) │ │ │ │ -70 : _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(_S_i_g_n_a_t_u_r_e(key, {}, spec)) {} │ │ │ │ -71 │ │ │ │ -75 │ │ │ │ -77 void print( │ │ │ │ -78 const std::string& s = "Discrete Prior: ", │ │ │ │ -79 const KeyFormatter& formatter = DefaultKeyFormatter) const override; │ │ │ │ -80 │ │ │ │ -84 │ │ │ │ -86 double operator()(size_t value) const; │ │ │ │ -87 │ │ │ │ -89 // TODO(dellaert): does not play well with wrapper! │ │ │ │ -90 // using Base::operator(); │ │ │ │ -91 │ │ │ │ -93 std::vector pmf() const; │ │ │ │ -94 │ │ │ │ -96#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -99 size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); } │ │ │ │ -101#endif │ │ │ │ -102}; │ │ │ │ -103// DiscreteDistribution │ │ │ │ -104 │ │ │ │ -105// traits │ │ │ │ -106template <> │ │ │ │ -_1_0_7struct _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> : public _T_e_s_t_a_b_l_e │ │ │ │ -{}; │ │ │ │ +51GTSAM_EXPORT │ │ │ │ +52std::pair │ │ │ │ +53_E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e(const DiscreteFactorGraph& factors, │ │ │ │ +54 const Ordering& frontalKeys); │ │ │ │ +55 │ │ │ │ +64GTSAM_EXPORT │ │ │ │ +65std::pair │ │ │ │ +66_E_l_i_m_i_n_a_t_e_F_o_r_M_P_E(const DiscreteFactorGraph& factors, │ │ │ │ +67 const Ordering& frontalKeys); │ │ │ │ +68 │ │ │ │ +_6_9template<> struct _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> │ │ │ │ +70{ │ │ │ │ +_7_1 typedef _D_i_s_c_r_e_t_e_F_a_c_t_o_r _F_a_c_t_o_r_T_y_p_e; │ │ │ │ +_7_2 typedef _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e; │ │ │ │ +_7_3 typedef _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e; │ │ │ │ +_7_4 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t _B_a_y_e_s_N_e_t_T_y_p_e; │ │ │ │ +_7_5 typedef _D_i_s_c_r_e_t_e_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_T_y_p_e; │ │ │ │ +_7_6 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_T_r_e_e _B_a_y_e_s_T_r_e_e_T_y_p_e; │ │ │ │ +_7_7 typedef _D_i_s_c_r_e_t_e_J_u_n_c_t_i_o_n_T_r_e_e _J_u_n_c_t_i_o_n_T_r_e_e_T_y_p_e; │ │ │ │ +78 │ │ │ │ +80 static std::pair, │ │ │ │ +81 boost::shared_ptr > │ │ │ │ +_8_2 _D_e_f_a_u_l_t_E_l_i_m_i_n_a_t_e(const _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e& factors, const _O_r_d_e_r_i_n_g& keys) { │ │ │ │ +83 return _E_l_i_m_i_n_a_t_e_D_i_s_c_r_e_t_e(factors, keys); │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +_8_7 static _O_r_d_e_r_i_n_g _D_e_f_a_u_l_t_O_r_d_e_r_i_n_g_F_u_n_c( │ │ │ │ +88 const _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e& graph, │ │ │ │ +89 boost::optional variableIndex) { │ │ │ │ +90 return _O_r_d_e_r_i_n_g_:_:_C_o_l_a_m_d(*variableIndex); │ │ │ │ +91 } │ │ │ │ +92}; │ │ │ │ +93 │ │ │ │ +_9_9class GTSAM_EXPORT _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +100 : public _F_a_c_t_o_r_G_r_a_p_h, │ │ │ │ +101 public _E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h { │ │ │ │ +102 public: │ │ │ │ +_1_0_3 using _T_h_i_s = _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h; │ │ │ │ +_1_0_4 using _B_a_s_e = _F_a_c_t_o_r_G_r_a_p_h_<_D_i_s_c_r_e_t_e_F_a_c_t_o_r_>; │ │ │ │ +_1_0_5 using _B_a_s_e_E_l_i_m_i_n_a_t_e_a_b_l_e = │ │ │ │ +106 _E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_<_T_h_i_s_>; │ │ │ │ +_1_0_7 using _s_h_a_r_e_d___p_t_r = boost::shared_ptr; │ │ │ │ 108 │ │ │ │ -109} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._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 │ │ │ │ +_1_0_9 using _V_a_l_u_e_s = _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ +110 │ │ │ │ +111 using Indices = _K_e_y_V_e_c_t_o_r; │ │ │ │ +112 │ │ │ │ +_1_1_4 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h() {} │ │ │ │ +115 │ │ │ │ +117 template │ │ │ │ +_1_1_8 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h(ITERATOR firstFactor, ITERATOR lastFactor) │ │ │ │ +119 : _B_a_s_e(firstFactor, lastFactor) {} │ │ │ │ +120 │ │ │ │ +122 template │ │ │ │ +_1_2_3 explicit _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h(const CONTAINER& factors) : _B_a_s_e(factors) {} │ │ │ │ +124 │ │ │ │ +127 template │ │ │ │ +_1_2_8 _D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h(const _F_a_c_t_o_r_G_r_a_p_h_<_D_E_R_I_V_E_D___F_A_C_T_O_R_>& graph) : _B_a_s_e(graph) │ │ │ │ +{} │ │ │ │ +129 │ │ │ │ +_1_3_1 virtual _~_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h() {} │ │ │ │ +132 │ │ │ │ +135 │ │ │ │ +136 bool _e_q_u_a_l_s(const This& fg, double tol = 1e-9) const; │ │ │ │ +137 │ │ │ │ +139 │ │ │ │ +141 template │ │ │ │ +_1_4_2 void _a_d_d(Args&&... args) { │ │ │ │ +143 emplace_shared(std::forward(args)...); │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +147 _K_e_y_S_e_t keys() const; │ │ │ │ +148 │ │ │ │ +150 _D_i_s_c_r_e_t_e_K_e_y_s discreteKeys() const; │ │ │ │ +151 │ │ │ │ +153 _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r product() const; │ │ │ │ +154 │ │ │ │ +159 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) const; │ │ │ │ +160 │ │ │ │ +162 void _p_r_i_n_t( │ │ │ │ +163 const std::string& s = "DiscreteFactorGraph", │ │ │ │ +164 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override; │ │ │ │ +165 │ │ │ │ +172 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t sumProduct( │ │ │ │ +173 OptionalOrderingType orderingType = boost::none) const; │ │ │ │ +174 │ │ │ │ +181 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t sumProduct(const _O_r_d_e_r_i_n_g& ordering) const; │ │ │ │ +182 │ │ │ │ +189 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G maxProduct( │ │ │ │ +190 OptionalOrderingType orderingType = boost::none) const; │ │ │ │ +191 │ │ │ │ +198 _D_i_s_c_r_e_t_e_L_o_o_k_u_p_D_A_G maxProduct(const _O_r_d_e_r_i_n_g& ordering) const; │ │ │ │ +199 │ │ │ │ +206 _D_i_s_c_r_e_t_e_V_a_l_u_e_s _o_p_t_i_m_i_z_e( │ │ │ │ +207 OptionalOrderingType orderingType = boost::none) const; │ │ │ │ +208 │ │ │ │ +215 _D_i_s_c_r_e_t_e_V_a_l_u_e_s _o_p_t_i_m_i_z_e(const _O_r_d_e_r_i_n_g& ordering) const; │ │ │ │ +216 │ │ │ │ +219 │ │ │ │ +227 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, │ │ │ │ +228 const _D_i_s_c_r_e_t_e_F_a_c_t_o_r_:_:_N_a_m_e_s& names = {}) const; │ │ │ │ +229 │ │ │ │ +237 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ +238 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +239 │ │ │ │ +243 │ │ │ │ +244 using Base::error; // Expose error(const HybridValues&) method.. │ │ │ │ +245 │ │ │ │ +247}; // \ DiscreteFactorGraph │ │ │ │ +248 │ │ │ │ +250template <> │ │ │ │ +_2_5_1struct _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> : public _T_e_s_t_a_b_l_e │ │ │ │ +{}; │ │ │ │ +252 │ │ │ │ +253} // namespace gtsam │ │ │ │ +_F_a_s_t_S_e_t_._h │ │ │ │ +A thin wrapper around std::set that uses boost's fast_pool_allocator. │ │ │ │ +_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_L_o_o_k_u_p_D_A_G_._h │ │ │ │ +_O_r_d_e_r_i_n_g_._h │ │ │ │ +Variable ordering for the elimination algorithm. │ │ │ │ +_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor Graph Base Class. │ │ │ │ +_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Variable elimination algorithms for factor graphs. │ │ │ │ +_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_:_:_E_l_i_m_i_n_a_t_e_F_o_r_M_P_E │ │ │ │ +std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > │ │ │ │ +EliminateForMPE(const DiscreteFactorGraph &factors, const Ordering │ │ │ │ +&frontalKeys) │ │ │ │ +Alternate elimination function for that creates non-normalized lookup tables. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.cpp:116 │ │ │ │ _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_:_:_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_:_:_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_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_:_:_F_a_s_t_S_e_t_<_ _K_e_y_ _> │ │ │ │ +_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_:_:_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_B_a_y_e_s_N_e_t │ │ │ │ +A Bayes net made from discrete conditional distributions. │ │ │ │ +DDeeffiinniittiioonn DiscreteBayesNet.h:38 │ │ │ │ +_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_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_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -A prior probability on a set of discrete variables. │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:33 │ │ │ │ -_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -DiscreteDistribution(const Signature &s) │ │ │ │ -Construct from a Signature. │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:52 │ │ │ │ -_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -DiscreteDistribution(const DiscreteKey &key, const std::vector< double > &spec) │ │ │ │ -Construct from key and a vector of floats specifying the probability mass │ │ │ │ -function (PMF). │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:60 │ │ │ │ -_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -DiscreteDistribution(const DiscreteKey &key, const std::string &spec) │ │ │ │ -Construct from key and a string specifying the probability mass function (PMF). │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:69 │ │ │ │ -_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -DiscreteDistribution() │ │ │ │ -Default constructor needed for serialization. │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:41 │ │ │ │ -_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ -DiscreteDistribution(const DecisionTreeFactor &f) │ │ │ │ -Constructor from factor. │ │ │ │ -DDeeffiinniittiioonn DiscreteDistribution.h:44 │ │ │ │ -_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_:_:_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_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_F_a_c_t_o_r_:_:_N_a_m_e_s │ │ │ │ +DiscreteValues::Names Names │ │ │ │ +Translation table from values to strings. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactor.h:106 │ │ │ │ +_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_ _>_:_:_F_a_c_t_o_r_G_r_a_p_h_T_y_p_e │ │ │ │ +DiscreteFactorGraph FactorGraphType │ │ │ │ +Type of the factor graph (e.g. DiscreteFactorGraph) │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:72 │ │ │ │ +_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_ _>_:_:_J_u_n_c_t_i_o_n_T_r_e_e_T_y_p_e │ │ │ │ +DiscreteJunctionTree JunctionTreeType │ │ │ │ +Type of Junction tree. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:77 │ │ │ │ +_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_ _>_:_:_F_a_c_t_o_r_T_y_p_e │ │ │ │ +DiscreteFactor FactorType │ │ │ │ +Type of factors in factor graph. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:71 │ │ │ │ +_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_ _>_:_:_D_e_f_a_u_l_t_E_l_i_m_i_n_a_t_e │ │ │ │ +static std::pair< boost::shared_ptr< ConditionalType >, boost::shared_ptr< │ │ │ │ +FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering │ │ │ │ +&keys) │ │ │ │ +The default dense elimination function. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:82 │ │ │ │ +_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_ _>_:_:_B_a_y_e_s_T_r_e_e_T_y_p_e │ │ │ │ +DiscreteBayesTree BayesTreeType │ │ │ │ +Type of Bayes tree. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:76 │ │ │ │ +_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_ _>_:_:_B_a_y_e_s_N_e_t_T_y_p_e │ │ │ │ +DiscreteBayesNet BayesNetType │ │ │ │ +Type of Bayes net from sequential elimination. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:74 │ │ │ │ +_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_ _>_:_:_C_o_n_d_i_t_i_o_n_a_l_T_y_p_e │ │ │ │ +DiscreteConditional ConditionalType │ │ │ │ +Type of conditionals from elimination. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:73 │ │ │ │ +_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_ _>_:_:_D_e_f_a_u_l_t_O_r_d_e_r_i_n_g_F_u_n_c │ │ │ │ +static Ordering DefaultOrderingFunc(const FactorGraphType &graph, boost:: │ │ │ │ +optional< const VariableIndex & > variableIndex) │ │ │ │ +The default ordering generation function. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:87 │ │ │ │ +_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_ _>_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_T_y_p_e │ │ │ │ +DiscreteEliminationTree EliminationTreeType │ │ │ │ +Type of elimination tree. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:75 │ │ │ │ +_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_F_a_c_t_o_r_G_r_a_p_h_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DiscreteFactorGraph(const CONTAINER &factors) │ │ │ │ +Construct from container of factors (shared_ptr or plain objects) │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:123 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +boost::shared_ptr< This > shared_ptr │ │ │ │ +shared_ptr to This │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:107 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DiscreteFactorGraph() │ │ │ │ +‍map from keys to values │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:114 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DiscreteFactorGraph(const FactorGraph< DERIVED_FACTOR > &graph) │ │ │ │ +Implicit copy/downcast constructor to override explicit template container │ │ │ │ +constructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:128 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DiscreteFactorGraph(ITERATOR firstFactor, ITERATOR lastFactor) │ │ │ │ +Construct from iterator over factors. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:118 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_~_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +virtual ~DiscreteFactorGraph() │ │ │ │ +Destructor. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:131 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_:_:_B_a_s_e_E_l_i_m_i_n_a_t_e_a_b_l_e │ │ │ │ +EliminateableFactorGraph< This > BaseEliminateable │ │ │ │ +for elimination │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:106 │ │ │ │ +_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_d_d │ │ │ │ +void add(Args &&... args) │ │ │ │ +Add a decision-tree factor. │ │ │ │ +DDeeffiinniittiioonn DiscreteFactorGraph.h:142 │ │ │ │ +_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_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_L_o_o_k_u_p_D_A_G │ │ │ │ +A DAG made from lookup tables, as defined above. │ │ │ │ +DDeeffiinniittiioonn DiscreteLookupDAG.h:77 │ │ │ │ +_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_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ +nodes. │ │ │ │ +DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s │ │ │ │ +Traits class for eliminateable factor graphs, specifies the types that result │ │ │ │ +from elimination,... │ │ │ │ +DDeeffiinniittiioonn EliminateableFactorGraph.h:36 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +EliminateableFactorGraph is a base class for factor graphs that contains │ │ │ │ +elimination algorithms. │ │ │ │ +DDeeffiinniittiioonn EliminateableFactorGraph.h:57 │ │ │ │ +_g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ +DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ +_g_t_s_a_m_:_:_O_r_d_e_r_i_n_g_:_:_C_o_l_a_m_d │ │ │ │ +static Ordering Colamd(const FACTOR_GRAPH &graph) │ │ │ │ +Compute a fill-reducing ordering using COLAMD from a factor graph (see details │ │ │ │ +for note on performanc... │ │ │ │ +DDeeffiinniittiioonn Ordering.h:95 │ │ │ │ * _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_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/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/DiscreteFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,32 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
DiscreteDistribution.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
December 2021
│ │ │ -
Author
Frank Dellaert
│ │ │ +

discrete factor

│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteDistribution.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 │ │ │ │ - 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_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/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/DiscreteValues.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
DiscreteConditional.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
DiscreteValues.cpp 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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ 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.
 
│ │ │

Detailed Description

│ │ │ -
Date
Feb 14, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +
Date
January, 2022
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -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_:_:_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_ _> │ │ │ │ -  │ │ │ │ +_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 │ │ │ │ +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_C_o_n_d_i_t_i_o_n_a_l_._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/a00236.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ var a00236 = [ │ │ │ │ - ["gtsam::traits< DiscreteConditional >", "a02836.html", null] │ │ │ │ + ["html", "a00236.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ + ["markdown", "a00236.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ ]; │ │ ├── ./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/DiscreteConditional.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Variables
│ │ │ -
DiscreteConditional.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
DiscreteConditional.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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,28 @@ │ │ │ │ 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 │ │ │ │ +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_:_:_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. │ │ │ │   │ │ │ │ -VVaarriiaabblleess │ │ │ │ -template class GTSAM_EXPORT  ggttssaamm::::CCoonnddiittiioonnaall<< DDeecciissiioonnTTrreeeeFFaaccttoorr,, │ │ │ │ - DDiissccrreetteeCCoonnddiittiioonnaall >> │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ 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_C_o_n_d_i_t_i_o_n_a_l_._c_p_p │ │ │ │ + * _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/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/DiscreteJunctionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,48 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
DiscreteBayesTree.h File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs
│ │ │ +
DiscreteJunctionTree.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::DiscreteBayesTree
 A Bayes tree representing a Discrete density. More...
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

│ │ │ -

Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.

│ │ │ -

DiscreteBayesTree

Author
Frank Dellaert
│ │ │ +
Date
Mar 29, 2013
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │ Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +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 │ │ │ │ -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 | _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_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_B_a_y_e_s_T_r_e_e │ │ │ │ -  A Bayes tree representing a Discrete density. _M_o_r_e_._._. │ │ │ │ +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 ********** │ │ │ │ -Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ -DiscreteBayesTree │ │ │ │ + Date │ │ │ │ + Mar 29, 2013 │ │ │ │ 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_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/a00242.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00242 = [ │ │ │ │ - ["gtsam::DiscreteBayesTreeClique", "a02824.html", "a02824"] │ │ │ │ + ["DiscreteCluster", "a00242.html#aa8c26fa5afbbfd23795d7d421e543a81", 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/DiscreteJunctionTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,134 +98,68 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteBayesTree.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
│ │ │
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 }
│ │ │ -
│ │ │ -
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};
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
24
│ │ │ +
25namespace gtsam {
│ │ │ +
26
│ │ │ +
27 // Forward declarations
│ │ │ +
28 class DiscreteEliminationTree;
│ │ │ +
29
│ │ │ +
│ │ │ +
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
│ │ │ -
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;
│ │ │ -
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.
│ │ │ + │ │ │ +
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 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.
│ │ │ +
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,155 +1,81 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteBayesTree.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 │ │ │ │ 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 } │ │ │ │ -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}; │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +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 │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +27 // Forward declarations │ │ │ │ +28 class DiscreteEliminationTree; │ │ │ │ +29 │ │ │ │ +_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 │ │ │ │ -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; │ │ │ │ -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 │ │ │ │ +_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_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ _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. │ │ │ │ +_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_:_:_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_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 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_B_a_y_e_s_T_r_e_e_._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/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/DiscreteValues.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,58 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
DiscreteBayesNet.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
DiscreteValues.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::DiscreteBayesNet
 A Bayes net made from discrete conditional distributions. More...
class  gtsam::DiscreteValues
 A map from keys to values. More...
 
struct  gtsam::traits< DiscreteBayesNet >
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

│ │ │ -
Date
Feb 15, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ -
│ │ │ -Frank dellaert
│ │ │ +
Date
Dec 13, 2021
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -DiscreteBayesNet.h 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 │ │ │ │ +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_N_e_t │ │ │ │ -  A Bayes net made from discrete conditional distributions. _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_._._. │ │ │ │   │ │ │ │ -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_ _> │ │ │ │ +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 ********** │ │ │ │ Date │ │ │ │ - Feb 15, 2011 │ │ │ │ + Dec 13, 2021 │ │ │ │ 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_B_a_y_e_s_N_e_t_._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/a00248.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00248 = [ │ │ │ │ - ["gtsam::traits< DiscreteBayesNet >", "a02820.html", null] │ │ │ │ + ["gtsam::traits< DiscreteValues >", "a02904.html", null], │ │ │ │ + ["cartesianProduct", "a00248.html#a55a86a4657d82f6ff048a10d058c529f", null], │ │ │ │ + ["html", "a00248.html#a147114735037c2260d4810a8820e72f6", null], │ │ │ │ + ["markdown", "a00248.html#a2b6707b04064df79d26d1016dfa2a013", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00248_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteBayesNet.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteValues.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,173 +98,136 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DiscreteBayesNet.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
│ │ │ -
19#pragma once
│ │ │ -
20
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
25
│ │ │ -
26#include <boost/shared_ptr.hpp>
│ │ │ -
27#include <map>
│ │ │ -
28#include <string>
│ │ │ -
29#include <utility>
│ │ │ -
30#include <vector>
│ │ │ -
31
│ │ │ -
32namespace gtsam {
│ │ │ -
33
│ │ │ -
│ │ │ -
38class GTSAM_EXPORT DiscreteBayesNet: public BayesNet<DiscreteConditional> {
│ │ │ -
39 public:
│ │ │ - │ │ │ -
41 typedef DiscreteBayesNet This;
│ │ │ - │ │ │ -
43 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ -
44 typedef boost::shared_ptr<ConditionalType> sharedConditional;
│ │ │ -
45
│ │ │ -
48
│ │ │ - │ │ │ +
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
│ │ │ -
53 template <typename ITERATOR>
│ │ │ -
│ │ │ -
54 DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
│ │ │ -
55 : Base(firstConditional, lastConditional) {}
│ │ │ -
│ │ │ -
56
│ │ │ -
58 template <class CONTAINER>
│ │ │ -
│ │ │ -
59 explicit DiscreteBayesNet(const CONTAINER& conditionals)
│ │ │ -
60 : Base(conditionals) {}
│ │ │ -
│ │ │ -
61
│ │ │ -
64 template <class DERIVEDCONDITIONAL>
│ │ │ -
│ │ │ - │ │ │ -
66 : Base(graph) {}
│ │ │ -
│ │ │ -
67
│ │ │ -
69 virtual ~DiscreteBayesNet() {}
│ │ │ -
70
│ │ │ -
72
│ │ │ +
55
│ │ │ +
57 void print(const std::string& s = "",
│ │ │ +
58 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
59
│ │ │ +
61 bool equals(const DiscreteValues& x, double tol = 1e-9) const;
│ │ │ +
62
│ │ │ +
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
│ │ │ -
77 bool equals(const This& bn, double tol = 1e-9) const;
│ │ │ -
78
│ │ │ +
79 DiscreteValues& update(const DiscreteValues& values);
│ │ │
80
│ │ │ -
83
│ │ │ -
84 // Add inherited versions of add.
│ │ │ -
85 using Base::add;
│ │ │ -
86
│ │ │ -
│ │ │ -
88 void add(const DiscreteKey& key, const std::string& spec) {
│ │ │ -
89 emplace_shared<DiscreteDistribution>(key, spec);
│ │ │ -
90 }
│ │ │ -
│ │ │ -
91
│ │ │ -
93 template <typename... Args>
│ │ │ -
│ │ │ -
94 void add(Args&&... args) {
│ │ │ -
95 emplace_shared<DiscreteConditional>(std::forward<Args>(args)...);
│ │ │ -
96 }
│ │ │ -
│ │ │ -
97
│ │ │ -
98 //** evaluate for given DiscreteValues */
│ │ │ -
99 double evaluate(const DiscreteValues & values) const;
│ │ │ -
100
│ │ │ -
101 //** (Preferred) sugar for the above for given DiscreteValues */
│ │ │ -
102 double operator()(const DiscreteValues & values) const {
│ │ │ -
103 return evaluate(values);
│ │ │ -
104 }
│ │ │ -
105
│ │ │ -
106 //** log(evaluate(values)) for given DiscreteValues */
│ │ │ -
107 double logProbability(const DiscreteValues & values) const;
│ │ │ -
108
│ │ │ -
118 DiscreteValues sample() const;
│ │ │ +
│ │ │ +
85 static std::vector<DiscreteValues> CartesianProduct(
│ │ │ +
86 const DiscreteKeys& keys) {
│ │ │ +
87 return Base::CartesianProduct<DiscreteValues>(keys);
│ │ │ +
88 }
│ │ │ +
│ │ │ +
89
│ │ │ +
93
│ │ │ +
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
│ │ │ -
128 DiscreteValues sample(DiscreteValues given) const;
│ │ │ -
129
│ │ │ -
133
│ │ │ -
135 std::string markdown(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ -
136 const DiscreteFactor::Names& names = {}) const;
│ │ │ +
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
│ │ │ -
139 std::string html(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
│ │ │ -
140 const DiscreteFactor::Names& names = {}) const;
│ │ │ +
138// traits
│ │ │ +
139template <>
│ │ │ +
140struct traits<DiscreteValues> : public Testable<DiscreteValues> {};
│ │ │
141
│ │ │ -
145
│ │ │ -
146 using Base::error; // Expose error(const HybridValues&) method..
│ │ │ -
147 using Base::evaluate; // Expose evaluate(const HybridValues&) method..
│ │ │ -
148 using Base::logProbability; // Expose logProbability(const HybridValues&)
│ │ │ -
149
│ │ │ -
151
│ │ │ -
152#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
155
│ │ │ -
156 DiscreteValues GTSAM_DEPRECATED optimize() const;
│ │ │ -
157 DiscreteValues GTSAM_DEPRECATED optimize(DiscreteValues given) const;
│ │ │ -
159#endif
│ │ │ -
160
│ │ │ -
161 private:
│ │ │ -
163 friend class boost::serialization::access;
│ │ │ -
164 template<class ARCHIVE>
│ │ │ -
165 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
166 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
167 }
│ │ │ -
168 };
│ │ │ -
│ │ │ -
169
│ │ │ -
170// traits
│ │ │ -
171template<> struct traits<DiscreteBayesNet> : public Testable<DiscreteBayesNet> {};
│ │ │ -
172
│ │ │ -
173} // \ namespace gtsam
│ │ │ -
174
│ │ │ - │ │ │ - │ │ │ -
Factor Graph Base Class.
│ │ │ -
Bayes network.
│ │ │ -
std::pair< Key, size_t > DiscreteKey
Key type for discrete variables.
Definition DiscreteKey.h:36
│ │ │ +
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
│ │ │ -
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │ +
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 helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ -
A Bayes net made from discrete conditional distributions.
Definition DiscreteBayesNet.h:38
│ │ │ -
DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
Construct from iterator over conditionals.
Definition DiscreteBayesNet.h:54
│ │ │ -
DiscreteBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition DiscreteBayesNet.h:65
│ │ │ -
DiscreteBayesNet(const CONTAINER &conditionals)
Construct from container of factors (shared_ptr or plain objects)
Definition DiscreteBayesNet.h:59
│ │ │ -
DiscreteBayesNet()
Construct empty Bayes net.
Definition DiscreteBayesNet.h:50
│ │ │ -
virtual ~DiscreteBayesNet()
Destructor.
Definition DiscreteBayesNet.h:69
│ │ │ -
void add(Args &&... args)
Add a DiscreteCondtional.
Definition DiscreteBayesNet.h:94
│ │ │ -
void add(const DiscreteKey &key, const std::string &spec)
Add a DiscreteDistribution using a table or a string.
Definition DiscreteBayesNet.h:88
│ │ │ -
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ +
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
│ │ │ -
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ -
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
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,211 +1,168 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DiscreteBayesNet.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 │ │ │ │ -19#pragma once │ │ │ │ -20 │ │ │ │ -21#include <_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> │ │ │ │ -22#include <_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> │ │ │ │ -23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31 │ │ │ │ -32namespace _g_t_s_a_m { │ │ │ │ -33 │ │ │ │ -_3_8class GTSAM_EXPORT _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t: public _B_a_y_e_s_N_e_t { │ │ │ │ -39 public: │ │ │ │ -40 typedef _B_a_y_e_s_N_e_t_<_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_> _B_a_s_e; │ │ │ │ -41 typedef _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t _T_h_i_s; │ │ │ │ -42 typedef _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e; │ │ │ │ -43 typedef boost::shared_ptr shared_ptr; │ │ │ │ -44 typedef boost::shared_ptr sharedConditional; │ │ │ │ -45 │ │ │ │ -48 │ │ │ │ -_5_0 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t() {} │ │ │ │ +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 │ │ │ │ -53 template │ │ │ │ -_5_4 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(ITERATOR firstConditional, ITERATOR lastConditional) │ │ │ │ -55 : _B_a_s_e(firstConditional, lastConditional) {} │ │ │ │ -56 │ │ │ │ -58 template │ │ │ │ -_5_9 explicit _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(const CONTAINER& conditionals) │ │ │ │ -60 : _B_a_s_e(conditionals) {} │ │ │ │ -61 │ │ │ │ -64 template │ │ │ │ -_6_5 _D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t(const _F_a_c_t_o_r_G_r_a_p_h_<_D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>& graph) │ │ │ │ -66 : _B_a_s_e(graph) {} │ │ │ │ -67 │ │ │ │ -_6_9 virtual _~_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t() {} │ │ │ │ -70 │ │ │ │ -72 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -77 bool _e_q_u_a_l_s(const This& bn, double tol = 1e-9) const; │ │ │ │ -78 │ │ │ │ +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 │ │ │ │ -83 │ │ │ │ -84 // Add inherited versions of add. │ │ │ │ -85 using Base::add; │ │ │ │ -86 │ │ │ │ -_8_8 void _a_d_d(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) { │ │ │ │ -89 emplace_shared(key, spec); │ │ │ │ -90 } │ │ │ │ -91 │ │ │ │ -93 template │ │ │ │ -_9_4 void _a_d_d(Args&&... args) { │ │ │ │ -95 emplace_shared(std::forward(args)...); │ │ │ │ -96 } │ │ │ │ -97 │ │ │ │ -98 //** evaluate for given DiscreteValues */ │ │ │ │ -99 double evaluate(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const; │ │ │ │ -100 │ │ │ │ -101 //** (Preferred) sugar for the above for given DiscreteValues */ │ │ │ │ -102 double operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const { │ │ │ │ -103 return evaluate(values); │ │ │ │ -104 } │ │ │ │ -105 │ │ │ │ -106 //** log(evaluate(values)) for given DiscreteValues */ │ │ │ │ -107 double logProbability(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s & values) const; │ │ │ │ -108 │ │ │ │ -118 _D_i_s_c_r_e_t_e_V_a_l_u_e_s sample() const; │ │ │ │ -119 │ │ │ │ -128 _D_i_s_c_r_e_t_e_V_a_l_u_e_s sample(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given) const; │ │ │ │ -129 │ │ │ │ -133 │ │ │ │ -135 std::string markdown(const KeyFormatter& keyFormatter = │ │ │ │ +_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 │ │ │ │ +_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, │ │ │ │ -136 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +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 │ │ │ │ -139 std::string _h_t_m_l(const KeyFormatter& keyFormatter = DefaultKeyFormatter, │ │ │ │ -140 const DiscreteFactor::Names& names = {}) const; │ │ │ │ +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 │ │ │ │ -145 │ │ │ │ -146 using Base::error; // Expose error(const HybridValues&) method.. │ │ │ │ -147 using Base::evaluate; // Expose evaluate(const HybridValues&) method.. │ │ │ │ -148 using Base::logProbability; // Expose logProbability(const HybridValues&) │ │ │ │ -149 │ │ │ │ -151 │ │ │ │ -152#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -155 │ │ │ │ -156 _D_i_s_c_r_e_t_e_V_a_l_u_e_s GTSAM_DEPRECATED _o_p_t_i_m_i_z_e() const; │ │ │ │ -157 _D_i_s_c_r_e_t_e_V_a_l_u_e_s GTSAM_DEPRECATED _o_p_t_i_m_i_z_e(_D_i_s_c_r_e_t_e_V_a_l_u_e_s given) const; │ │ │ │ -159#endif │ │ │ │ -160 │ │ │ │ -161 private: │ │ │ │ -_1_6_3 friend class boost::serialization::access; │ │ │ │ -164 template │ │ │ │ -165 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -166 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -167 } │ │ │ │ -168 }; │ │ │ │ -169 │ │ │ │ -170// traits │ │ │ │ -_1_7_1template<> struct _t_r_a_i_t_s<_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t> : public │ │ │ │ -_T_e_s_t_a_b_l_e {}; │ │ │ │ -172 │ │ │ │ -173} // \ namespace gtsam │ │ │ │ -174 │ │ │ │ -_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n_._h │ │ │ │ -_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Factor Graph Base Class. │ │ │ │ -_B_a_y_e_s_N_e_t_._h │ │ │ │ -Bayes network. │ │ │ │ -_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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -A Bayes net made from discrete conditional distributions. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:38 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -DiscreteBayesNet(ITERATOR firstConditional, ITERATOR lastConditional) │ │ │ │ -Construct from iterator over conditionals. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:54 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -DiscreteBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph) │ │ │ │ -Implicit copy/downcast constructor to override explicit template container │ │ │ │ -constructor. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:65 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -DiscreteBayesNet(const CONTAINER &conditionals) │ │ │ │ -Construct from container of factors (shared_ptr or plain objects) │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:59 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -DiscreteBayesNet() │ │ │ │ -Construct empty Bayes net. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:50 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_~_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t │ │ │ │ -virtual ~DiscreteBayesNet() │ │ │ │ -Destructor. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:69 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_a_d_d │ │ │ │ -void add(Args &&... args) │ │ │ │ -Add a DiscreteCondtional. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:94 │ │ │ │ -_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_B_a_y_e_s_N_e_t_:_:_a_d_d │ │ │ │ -void add(const DiscreteKey &key, const std::string &spec) │ │ │ │ -Add a DiscreteDistribution using a table or a string. │ │ │ │ -DDeeffiinniittiioonn DiscreteBayesNet.h:88 │ │ │ │ -_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_:_:_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_N_e_t │ │ │ │ -A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ -DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ -_g_t_s_a_m_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ -nodes. │ │ │ │ -DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_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_N_e_t_._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/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/AlgebraicDecisionTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,33 +95,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
DiscreteBayesNet.cpp File Reference
│ │ │ +
AlgebraicDecisionTree.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
Feb 15, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ +
Date
Feb 20, 2022
│ │ │ +
Author
Mike Sheffler
│ │ │ +
│ │ │ +Duy-Nguyen Ta
│ │ │
│ │ │ Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -DiscreteBayesNet.cpp File Reference │ │ │ │ +AlgebraicDecisionTree.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Feb 15, 2011 │ │ │ │ + Feb 20, 2022 │ │ │ │ Author │ │ │ │ + Mike Sheffler │ │ │ │ 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 │ │ │ │ + * _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/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/DiscreteMarginals.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,43 +96,47 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
DecisionTreeFactor.h File Reference
│ │ │ +
DiscreteMarginals.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

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

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::DecisionTreeFactor
 A discrete probabilistic factor. More...
 
struct  gtsam::traits< DecisionTreeFactor >
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

│ │ │ -
Date
Feb 14, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ +

A class for computing marginals in a DiscreteFactorGraph.

│ │ │ +
Author
Abhijit Kundu
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │ Frank Dellaert
│ │ │ +
Date
June 4, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -DecisionTreeFactor.h File Reference │ │ │ │ +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_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_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_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Feb 14, 2011 │ │ │ │ +A class for computing marginals in a DiscreteFactorGraph. │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ + Abhijit Kundu │ │ │ │ + Richard Roberts │ │ │ │ Frank Dellaert │ │ │ │ + Date │ │ │ │ + June 4, 2012 │ │ │ │ * _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_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/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/DiscreteMarginals.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,241 +98,101 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DecisionTreeFactor.h
│ │ │ +
DiscreteMarginals.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
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
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;
│ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ +
25#include <gtsam/base/Vector.h>
│ │ │ +
26
│ │ │ +
27namespace gtsam {
│ │ │ +
28
│ │ │ +
│ │ │ + │ │ │ +
34
│ │ │ +
35 protected:
│ │ │ +
36
│ │ │ +
37 DiscreteBayesTree::shared_ptr bayesTree_;
│ │ │
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
│ │ │ - │ │ │ -
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.
│ │ │ +
39 public:
│ │ │ +
40
│ │ │ + │ │ │ +
42
│ │ │ +
│ │ │ + │ │ │ +
47 bayesTree_ = graph.eliminateMultifrontal();
│ │ │ +
48 }
│ │ │ +
│ │ │ +
49
│ │ │ +
│ │ │ + │ │ │ +
52 // Compute marginal
│ │ │ +
53 DiscreteFactor::shared_ptr marginalFactor;
│ │ │ +
54 marginalFactor = bayesTree_->marginalFactor(variable, &EliminateDiscrete);
│ │ │ +
55 return marginalFactor;
│ │ │ +
56 }
│ │ │ +
│ │ │ +
57
│ │ │ +
│ │ │ +
62 Vector marginalProbabilities(const DiscreteKey& key) const {
│ │ │ +
63 // Compute marginal
│ │ │ +
64 DiscreteFactor::shared_ptr marginalFactor;
│ │ │ +
65 marginalFactor = bayesTree_->marginalFactor(key.first, &EliminateDiscrete);
│ │ │ +
66
│ │ │ +
67 //Create result
│ │ │ +
68 Vector vResult(key.second);
│ │ │ +
69 for (size_t state = 0; state < key.second ; ++ state) {
│ │ │ +
70 DiscreteValues values;
│ │ │ +
71 values[key.first] = state;
│ │ │ +
72 vResult(state) = (*marginalFactor)(values);
│ │ │ +
73 }
│ │ │ +
74 return vResult;
│ │ │ +
75 }
│ │ │ +
│ │ │ +
76
│ │ │ +
77 };
│ │ │ +
│ │ │ +
78
│ │ │ +
79} /* namespace gtsam */
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │ +
Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree.
│ │ │ + │ │ │ +
std::pair< DiscreteConditional::shared_ptr, DecisionTreeFactor::shared_ptr > EliminateDiscrete(const DiscreteFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for DiscreteFactorGraph.
Definition DiscreteFactorGraph.cpp:200
│ │ │
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
│ │ │ -
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
│ │ │ +
boost::shared_ptr< DiscreteFactor > shared_ptr
shared_ptr to this class
Definition DiscreteFactor.h:44
│ │ │ +
A Discrete Factor Graph is a factor graph where all factors are Discrete, i.e.
Definition DiscreteFactorGraph.h:101
│ │ │ +
A class for computing marginals of variables in a DiscreteFactorGraph.
Definition DiscreteMarginals.h:33
│ │ │ +
Vector marginalProbabilities(const DiscreteKey &key) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.h:62
│ │ │ +
DiscreteMarginals(const DiscreteFactorGraph &graph)
Construct a marginals class.
Definition DiscreteMarginals.h:46
│ │ │ +
DiscreteFactor::shared_ptr operator()(Key variable) const
Compute the marginal of a single variable.
Definition DiscreteMarginals.h:51
│ │ │
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ -
Definition Ordering.h:34
│ │ │ -
the error.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,303 +1,118 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DecisionTreeFactor.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 │ │ │ │ -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#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 │ │ │ │ +_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 │ │ │ │ -_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(); │ │ │ │ -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. │ │ │ │ +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_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Discrete Bayes Tree, the result of eliminating a DiscreteJunctionTree. │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_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_:_:_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_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_:_:_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 │ │ │ │ * _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_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/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/AlgebraicDecisionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
DecisionTreeFactor.cpp File Reference
│ │ │ +
AlgebraicDecisionTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

discrete factor │ │ │ +

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

│ │ │ -

discrete factor

│ │ │ -
Date
Feb 14, 2011
│ │ │ -
Author
Duy-Nguyen Ta
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +

Algebraic Decision Trees.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
Mar 14, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,33 @@ │ │ │ │ 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 │ │ │ │ +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 ********** │ │ │ │ -discrete factor │ │ │ │ - Date │ │ │ │ - Feb 14, 2011 │ │ │ │ +Algebraic Decision Trees. │ │ │ │ Author │ │ │ │ - Duy-Nguyen Ta │ │ │ │ Frank Dellaert │ │ │ │ + Date │ │ │ │ + Mar 14, 2011 │ │ │ │ * _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 │ │ │ │ + * _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/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/DiscreteEliminationTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,73 +95,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
DecisionTree.h File Reference
│ │ │ +Namespaces
│ │ │ +
DiscreteEliminationTree.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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 > >
class  gtsam::DiscreteEliminationTree
 Elimination tree for discrete factors. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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.

│ │ │ +
Date
Mar 29, 2013
│ │ │
Author
Frank Dellaert
│ │ │
│ │ │ -Can Erdogan
│ │ │ -
Date
Jan 30, 2012
│ │ │ +Richard Roberts │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +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 | _F_u_n_c_t_i_o_n_s │ │ │ │ -DecisionTree.h File Reference │ │ │ │ -Decision Tree for use in DiscreteFactors. _M_o_r_e_._._. │ │ │ │ +_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_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_ _>_ _> │ │ │ │ +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. │ │ │ │   │ │ │ │ -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. │ │ │ │ + Date │ │ │ │ + Mar 29, 2013 │ │ │ │ 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_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/a00260_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DecisionTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/discrete/DiscreteEliminationTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,333 +98,78 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
DecisionTree.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
│ │ │
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/Testable.h>
│ │ │ -
23#include <gtsam/base/types.h>
│ │ │ - │ │ │ -
25
│ │ │ -
26#include <boost/serialization/nvp.hpp>
│ │ │ -
27#include <boost/shared_ptr.hpp>
│ │ │ -
28#include <functional>
│ │ │ -
29#include <iostream>
│ │ │ -
30#include <map>
│ │ │ -
31#include <set>
│ │ │ -
32#include <sstream>
│ │ │ -
33#include <string>
│ │ │ -
34#include <utility>
│ │ │ -
35#include <vector>
│ │ │ -
36
│ │ │ -
37namespace gtsam {
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
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
│ │ │ -
60 template<typename L, typename Y>
│ │ │ -
│ │ │ - │ │ │ -
62 protected:
│ │ │ -
│ │ │ -
64 static bool DefaultCompare(const Y& a, const Y& b) {
│ │ │ -
65 return a == b;
│ │ │ -
66 }
│ │ │ -
│ │ │ -
67
│ │ │ -
68 public:
│ │ │ -
69 using LabelFormatter = std::function<std::string(L)>;
│ │ │ -
70 using ValueFormatter = std::function<std::string(Y)>;
│ │ │ -
71 using CompareFunc = std::function<bool(const Y&, const Y&)>;
│ │ │ -
72
│ │ │ -
74 using Unary = std::function<Y(const Y&)>;
│ │ │ -
75 using UnaryAssignment = std::function<Y(const Assignment<L>&, const Y&)>;
│ │ │ -
76 using Binary = std::function<Y(const Y&, const Y&)>;
│ │ │ -
77
│ │ │ -
79 using LabelC = std::pair<L, size_t>;
│ │ │ -
80
│ │ │ -
82 struct Leaf;
│ │ │ -
83 struct Choice;
│ │ │ -
84
│ │ │ -
│ │ │ -
86 struct Node {
│ │ │ -
87 using Ptr = boost::shared_ptr<const Node>;
│ │ │ -
88
│ │ │ -
89#ifdef DT_DEBUG_MEMORY
│ │ │ -
90 static int nrNodes;
│ │ │ -
91#endif
│ │ │ -
92
│ │ │ -
93 // Constructor
│ │ │ -
94 Node() {
│ │ │ -
95#ifdef DT_DEBUG_MEMORY
│ │ │ -
96 std::cout << ++nrNodes << " constructed " << id() << std::endl;
│ │ │ -
97 std::cout.flush();
│ │ │ -
98#endif
│ │ │ -
99 }
│ │ │ -
100
│ │ │ -
101 // Destructor
│ │ │ -
102 virtual ~Node() {
│ │ │ -
103#ifdef DT_DEBUG_MEMORY
│ │ │ -
104 std::cout << --nrNodes << " destructed " << id() << std::endl;
│ │ │ -
105 std::cout.flush();
│ │ │ -
106#endif
│ │ │ -
107 }
│ │ │ -
108
│ │ │ -
109 // Unique ID for dot files
│ │ │ -
110 const void* id() const { return this; }
│ │ │ -
111
│ │ │ -
112 // everything else is virtual, no documentation here as internal
│ │ │ -
113 virtual void print(const std::string& s,
│ │ │ -
114 const LabelFormatter& labelFormatter,
│ │ │ -
115 const ValueFormatter& valueFormatter) const = 0;
│ │ │ -
116 virtual void dot(std::ostream& os, const LabelFormatter& labelFormatter,
│ │ │ -
117 const ValueFormatter& valueFormatter,
│ │ │ -
118 bool showZero) const = 0;
│ │ │ -
119 virtual bool sameLeaf(const Leaf& q) const = 0;
│ │ │ -
120 virtual bool sameLeaf(const Node& q) const = 0;
│ │ │ -
121 virtual bool equals(const Node& other, const CompareFunc& compare =
│ │ │ -
122 &DefaultCompare) const = 0;
│ │ │ -
123 virtual const Y& operator()(const Assignment<L>& x) const = 0;
│ │ │ -
124 virtual Ptr apply(const Unary& op) const = 0;
│ │ │ -
125 virtual Ptr apply(const UnaryAssignment& op,
│ │ │ -
126 const Assignment<L>& assignment) const = 0;
│ │ │ -
127 virtual Ptr apply_f_op_g(const Node&, const Binary&) const = 0;
│ │ │ -
128 virtual Ptr apply_g_op_fL(const Leaf&, const Binary&) const = 0;
│ │ │ -
129 virtual Ptr apply_g_op_fC(const Choice&, const Binary&) const = 0;
│ │ │ -
130 virtual Ptr choose(const L& label, size_t index) const = 0;
│ │ │ -
131 virtual bool isLeaf() const = 0;
│ │ │ -
132
│ │ │ -
133 private:
│ │ │ - │ │ │ -
136 template <class ARCHIVE>
│ │ │ -
137 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {}
│ │ │ -
138 };
│ │ │ -
│ │ │ -
141 public:
│ │ │ -
143 using NodePtr = typename Node::Ptr;
│ │ │ -
144
│ │ │ - │ │ │ -
147
│ │ │ -
148 protected:
│ │ │ -
153 template<typename It, typename ValueIt>
│ │ │ -
154 NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const;
│ │ │ -
155
│ │ │ -
166 template <typename M, typename X>
│ │ │ - │ │ │ -
168 std::function<L(const M&)> L_of_M,
│ │ │ -
169 std::function<Y(const X&)> Y_of_X) const;
│ │ │ -
170
│ │ │ -
171 public:
│ │ │ -
174
│ │ │ -
176 DecisionTree();
│ │ │ -
177
│ │ │ -
179 explicit DecisionTree(const Y& y);
│ │ │ -
180
│ │ │ -
188 DecisionTree(const L& label, const Y& y1, const Y& y2);
│ │ │ -
189
│ │ │ -
191 DecisionTree(const LabelC& label, const Y& y1, const Y& y2);
│ │ │ -
192
│ │ │ -
194 DecisionTree(const std::vector<LabelC>& labelCs, const std::vector<Y>& ys);
│ │ │ -
195
│ │ │ -
197 DecisionTree(const std::vector<LabelC>& labelCs, const std::string& table);
│ │ │ -
198
│ │ │ -
200 template<typename Iterator>
│ │ │ -
201 DecisionTree(Iterator begin, Iterator end, const L& label);
│ │ │ -
202
│ │ │ -
204 DecisionTree(const L& label, const DecisionTree& f0,
│ │ │ -
205 const DecisionTree& f1);
│ │ │ -
206
│ │ │ -
214 template <typename X, typename Func>
│ │ │ -
215 DecisionTree(const DecisionTree<L, X>& other, Func Y_of_X);
│ │ │ -
216
│ │ │ -
227 template <typename M, typename X, typename Func>
│ │ │ -
228 DecisionTree(const DecisionTree<M, X>& other, const std::map<M, L>& map,
│ │ │ -
229 Func Y_of_X);
│ │ │ -
230
│ │ │ -
234
│ │ │ -
242 void print(const std::string& s, const LabelFormatter& labelFormatter,
│ │ │ -
243 const ValueFormatter& valueFormatter) const;
│ │ │ -
244
│ │ │ -
245 // Testable
│ │ │ -
246 bool equals(const DecisionTree& other,
│ │ │ -
247 const CompareFunc& compare = &DefaultCompare) const;
│ │ │ -
248
│ │ │ -
252
│ │ │ -
254 virtual ~DecisionTree() = default;
│ │ │ -
255
│ │ │ -
257 bool empty() const { return !root_; }
│ │ │ -
258
│ │ │ -
260 bool operator==(const DecisionTree& q) const;
│ │ │ -
261
│ │ │ -
263 const Y& operator()(const Assignment<L>& x) const;
│ │ │ -
264
│ │ │ -
279 template <typename Func>
│ │ │ -
280 void visit(Func f) const;
│ │ │ -
281
│ │ │ -
296 template <typename Func>
│ │ │ -
297 void visitLeaf(Func f) const;
│ │ │ -
298
│ │ │ -
313 template <typename Func>
│ │ │ -
314 void visitWith(Func f) const;
│ │ │ -
315
│ │ │ -
317 size_t nrLeaves() const;
│ │ │ -
318
│ │ │ -
334 template <typename Func, typename X>
│ │ │ -
335 X fold(Func f, X x0) const;
│ │ │ -
336
│ │ │ -
338 std::set<L> labels() const;
│ │ │ -
339
│ │ │ -
341 DecisionTree apply(const Unary& op) const;
│ │ │ -
342
│ │ │ -
351 DecisionTree apply(const UnaryAssignment& op) const;
│ │ │ -
352
│ │ │ -
354 DecisionTree apply(const DecisionTree& g, const Binary& op) const;
│ │ │ -
355
│ │ │ -
│ │ │ -
358 DecisionTree choose(const L& label, size_t index) const {
│ │ │ -
359 NodePtr newRoot = root_->choose(label, index);
│ │ │ -
360 return DecisionTree(newRoot);
│ │ │ -
361 }
│ │ │ -
│ │ │ -
362
│ │ │ -
364 DecisionTree combine(const L& label, size_t cardinality,
│ │ │ -
365 const Binary& op) const;
│ │ │ -
366
│ │ │ -
│ │ │ -
368 DecisionTree combine(const LabelC& labelC, const Binary& op) const {
│ │ │ -
369 return combine(labelC.first, labelC.second, op);
│ │ │ -
370 }
│ │ │ -
│ │ │ -
371
│ │ │ -
373 void dot(std::ostream& os, const LabelFormatter& labelFormatter,
│ │ │ -
374 const ValueFormatter& valueFormatter, bool showZero = true) const;
│ │ │ -
375
│ │ │ -
377 void dot(const std::string& name, const LabelFormatter& labelFormatter,
│ │ │ -
378 const ValueFormatter& valueFormatter, bool showZero = true) const;
│ │ │ -
379
│ │ │ -
381 std::string dot(const LabelFormatter& labelFormatter,
│ │ │ -
382 const ValueFormatter& valueFormatter,
│ │ │ -
383 bool showZero = true) const;
│ │ │ -
384
│ │ │ -
387
│ │ │ -
388 // internal use only
│ │ │ -
389 explicit DecisionTree(const NodePtr& root);
│ │ │ -
390
│ │ │ -
391 // internal use only
│ │ │ -
392 template<typename Iterator> NodePtr
│ │ │ -
393 compose(Iterator begin, Iterator end, const L& label) const;
│ │ │ -
394
│ │ │ -
396
│ │ │ -
397 private:
│ │ │ - │ │ │ -
400 template <class ARCHIVE>
│ │ │ -
401 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ -
402 ar& BOOST_SERIALIZATION_NVP(root_);
│ │ │ -
403 }
│ │ │ -
404 }; // DecisionTree
│ │ │ -
│ │ │ -
405
│ │ │ -
406 template <class L, class Y>
│ │ │ -
407 struct traits<DecisionTree<L, Y>> : public Testable<DecisionTree<L, Y>> {};
│ │ │ -
408
│ │ │ -
412 template<typename L, typename Y>
│ │ │ -
│ │ │ - │ │ │ -
414 const typename DecisionTree<L, Y>::Unary& op) {
│ │ │ -
415 return f.apply(op);
│ │ │ -
416 }
│ │ │ -
│ │ │ -
417
│ │ │ -
419 template<typename L, typename Y>
│ │ │ -
│ │ │ - │ │ │ -
421 const typename DecisionTree<L, Y>::UnaryAssignment& op) {
│ │ │ -
422 return f.apply(op);
│ │ │ -
423 }
│ │ │ -
│ │ │ -
424
│ │ │ -
426 template<typename L, typename Y>
│ │ │ -
│ │ │ - │ │ │ -
428 const DecisionTree<L, Y>& g,
│ │ │ -
429 const typename DecisionTree<L, Y>::Binary& op) {
│ │ │ -
430 return f.apply(g, op);
│ │ │ -
431 }
│ │ │ -
│ │ │ -
432
│ │ │ -
439 template <typename L, typename T1, typename T2>
│ │ │ -
│ │ │ -
440 std::pair<DecisionTree<L, T1>, DecisionTree<L, T2> > unzip(
│ │ │ -
441 const DecisionTree<L, std::pair<T1, T2> >& input) {
│ │ │ -
442 return std::make_pair(
│ │ │ -
443 DecisionTree<L, T1>(input, [](std::pair<T1, T2> i) { return i.first; }),
│ │ │ - │ │ │ -
445 [](std::pair<T1, T2> i) { return i.second; }));
│ │ │ -
446 }
│ │ │ -
│ │ │ -
447
│ │ │ -
448} // namespace gtsam
│ │ │ -
Typedefs for easier changing of types.
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
An assignment from labels to a discrete value index (size_t)
│ │ │ + │ │ │ +
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
│ │ │ +
63 friend class ::EliminationTreeTester;
│ │ │ +
64
│ │ │ +
65 };
│ │ │ +
│ │ │ +
66
│ │ │ +
67}
│ │ │ + │ │ │ + │ │ │ + │ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > unzip(const DecisionTree< L, std::pair< T1, T2 > > &input)
unzip a DecisionTree with std::pair values.
Definition DecisionTree.h:440
│ │ │ -
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
│ │ │
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 assignment from labels to value index (size_t).
Definition Assignment.h:37
│ │ │ -
Definition DecisionTree-inl.h:52
│ │ │ -
Definition DecisionTree-inl.h:172
│ │ │ -
a decision tree is a function from assignments to values.
Definition DecisionTree.h:61
│ │ │ -
DecisionTree apply(const Unary &op) const
apply Unary operation "op" to f
Definition DecisionTree-inl.h:889
│ │ │ -
DecisionTree choose(const L &label, size_t index) const
create a new function where value(label)==index It's like "restrict" in Darwiche09book pg329,...
Definition DecisionTree.h:358
│ │ │ -
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<M, X> to DecisionTree<L, Y>.
Definition DecisionTree-inl.h:671
│ │ │ -
DecisionTree combine(const LabelC &labelC, const Binary &op) const
combine with LabelC for convenience
Definition DecisionTree.h:368
│ │ │ -
NodePtr create(It begin, It end, ValueIt beginY, ValueIt endY) const
Internal recursive function to create from keys, cardinalities, and Y values.
Definition DecisionTree-inl.h:630
│ │ │ -
virtual ~DecisionTree()=default
Make virtual.
│ │ │ -
static bool DefaultCompare(const Y &a, const Y &b)
Default method for comparison of two objects of type Y.
Definition DecisionTree.h:64
│ │ │ -
typename Node::Ptr NodePtr
---------------------— Node base class ------------------------—
Definition DecisionTree.h:143
│ │ │ -
std::set< L > labels() const
Retrieve all unique labels as a set.
Definition DecisionTree-inl.h:853
│ │ │ -
bool empty() const
Check if tree is empty.
Definition DecisionTree.h:257
│ │ │ -
void visit(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:736
│ │ │ -
void visitLeaf(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:773
│ │ │ -
std::function< Y(const Y &)> Unary
Handy typedefs for unary and binary function types.
Definition DecisionTree.h:74
│ │ │ -
X fold(Func f, X x0) const
Fold a binary function over the tree, returning accumulator.
Definition DecisionTree-inl.h:833
│ │ │ -
NodePtr root_
A DecisionTree just contains the root. TODO(dellaert): make protected.
Definition DecisionTree.h:146
│ │ │ -
void print(const std::string &s, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter) const
GTSAM-style print.
Definition DecisionTree-inl.h:872
│ │ │ -
DecisionTree combine(const L &label, size_t cardinality, const Binary &op) const
combine subtrees on key with binary operation "op"
Definition DecisionTree-inl.h:937
│ │ │ -
void visitWith(Func f) const
Visit all leaves in depth-first fashion.
Definition DecisionTree-inl.h:816
│ │ │ -
const Y & operator()(const Assignment< L > &x) const
evaluate
Definition DecisionTree-inl.h:884
│ │ │ -
void dot(std::ostream &os, const LabelFormatter &labelFormatter, const ValueFormatter &valueFormatter, bool showZero=true) const
output to graphviz format, stream version
Definition DecisionTree-inl.h:949
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition DecisionTree.h:399
│ │ │ -
bool operator==(const DecisionTree &q) const
equality
Definition DecisionTree-inl.h:879
│ │ │ -
std::pair< L, size_t > LabelC
A label annotated with cardinality.
Definition DecisionTree.h:79
│ │ │ -
size_t nrLeaves() const
Return the number of leaves in the tree.
Definition DecisionTree-inl.h:823
│ │ │ -
DecisionTree()
Default constructor (for serialization)
Definition DecisionTree-inl.h:462
│ │ │ -
---------------------— Node base class ------------------------—
Definition DecisionTree.h:86
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition DecisionTree.h:135
│ │ │ +
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 VariableIndex class computes and stores the block column structure of a factor graph.
Definition VariableIndex.h:43
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ @@ -1 +1 @@ │ │ │ │ -utf-8 │ │ │ │ +us-ascii │ │ │ ├── html2text {} │ │ │ │ @@ -1,417 +1,91 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -DecisionTree.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 │ │ │ │ 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_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ -24#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> │ │ │ │ -25 │ │ │ │ -26#include │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34#include │ │ │ │ -35#include │ │ │ │ -36 │ │ │ │ -37namespace _g_t_s_a_m { │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +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 │ │ │ │ -60 template │ │ │ │ -_6_1 class _D_e_c_i_s_i_o_n_T_r_e_e { │ │ │ │ -62 protected: │ │ │ │ -_6_4 static bool _D_e_f_a_u_l_t_C_o_m_p_a_r_e(const Y& a, const Y& b) { │ │ │ │ -65 return a == b; │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -68 public: │ │ │ │ -69 using LabelFormatter = std::function; │ │ │ │ -70 using ValueFormatter = std::function; │ │ │ │ -71 using CompareFunc = std::function; │ │ │ │ -72 │ │ │ │ -_7_4 using _U_n_a_r_y = std::function; │ │ │ │ -75 using UnaryAssignment = std::function&, const Y&)>; │ │ │ │ -76 using Binary = std::function; │ │ │ │ -77 │ │ │ │ -_7_9 using _L_a_b_e_l_C = std::pair; │ │ │ │ -80 │ │ │ │ -82 struct _L_e_a_f; │ │ │ │ -83 struct _C_h_o_i_c_e; │ │ │ │ -84 │ │ │ │ -_8_6 struct _N_o_d_e { │ │ │ │ -87 using Ptr = boost::shared_ptr; │ │ │ │ -88 │ │ │ │ -89#ifdef DT_DEBUG_MEMORY │ │ │ │ -90 static int nrNodes; │ │ │ │ -91#endif │ │ │ │ -92 │ │ │ │ -93 // Constructor │ │ │ │ -94 _N_o_d_e() { │ │ │ │ -95#ifdef DT_DEBUG_MEMORY │ │ │ │ -96 std::cout << ++nrNodes << " constructed " << id() << std::endl; │ │ │ │ -97 std::cout.flush(); │ │ │ │ -98#endif │ │ │ │ -99 } │ │ │ │ -100 │ │ │ │ -101 // Destructor │ │ │ │ -102 virtual _~_N_o_d_e() { │ │ │ │ -103#ifdef DT_DEBUG_MEMORY │ │ │ │ -104 std::cout << --nrNodes << " destructed " << id() << std::endl; │ │ │ │ -105 std::cout.flush(); │ │ │ │ -106#endif │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -109 // Unique ID for dot files │ │ │ │ -110 const void* id() const { return this; } │ │ │ │ -111 │ │ │ │ -112 // everything else is virtual, no documentation here as internal │ │ │ │ -113 virtual void print(const std::string& s, │ │ │ │ -114 const LabelFormatter& labelFormatter, │ │ │ │ -115 const ValueFormatter& valueFormatter) const = 0; │ │ │ │ -116 virtual void dot(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ -117 const ValueFormatter& valueFormatter, │ │ │ │ -118 bool showZero) const = 0; │ │ │ │ -119 virtual bool sameLeaf(const _L_e_a_f& q) const = 0; │ │ │ │ -120 virtual bool sameLeaf(const _N_o_d_e& q) const = 0; │ │ │ │ -121 virtual bool _e_q_u_a_l_s(const _N_o_d_e& other, const CompareFunc& compare = │ │ │ │ -122 &_D_e_f_a_u_l_t_C_o_m_p_a_r_e) const = 0; │ │ │ │ -123 virtual const Y& operator()(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const = 0; │ │ │ │ -124 virtual Ptr apply(const _U_n_a_r_y& op) const = 0; │ │ │ │ -125 virtual Ptr apply(const UnaryAssignment& op, │ │ │ │ -126 const _A_s_s_i_g_n_m_e_n_t_<_L_>& assignment) const = 0; │ │ │ │ -127 virtual Ptr apply_f_op_g(const _N_o_d_e&, const Binary&) const = 0; │ │ │ │ -128 virtual Ptr apply_g_op_fL(const _L_e_a_f&, const Binary&) const = 0; │ │ │ │ -129 virtual Ptr apply_g_op_fC(const _C_h_o_i_c_e&, const Binary&) const = 0; │ │ │ │ -130 virtual Ptr choose(const L& label, size_t index) const = 0; │ │ │ │ -131 virtual bool isLeaf() const = 0; │ │ │ │ -132 │ │ │ │ -133 private: │ │ │ │ -_1_3_5 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; │ │ │ │ -136 template │ │ │ │ -137 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {} │ │ │ │ -138 }; │ │ │ │ -141 public: │ │ │ │ -_1_4_3 using _N_o_d_e_P_t_r = typename Node::Ptr; │ │ │ │ -144 │ │ │ │ -_1_4_6 _N_o_d_e_P_t_r _r_o_o_t__; │ │ │ │ -147 │ │ │ │ -148 protected: │ │ │ │ -153 template │ │ │ │ -154 _N_o_d_e_P_t_r _c_r_e_a_t_e(It begin, It end, ValueIt beginY, ValueIt endY) const; │ │ │ │ -155 │ │ │ │ -166 template │ │ │ │ -167 _N_o_d_e_P_t_r _c_o_n_v_e_r_t_F_r_o_m(const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_M_,_ _X_>_:_:_N_o_d_e_P_t_r& f, │ │ │ │ -168 std::function L_of_M, │ │ │ │ -169 std::function Y_of_X) const; │ │ │ │ -170 │ │ │ │ -171 public: │ │ │ │ -174 │ │ │ │ -176 _D_e_c_i_s_i_o_n_T_r_e_e(); │ │ │ │ -177 │ │ │ │ -179 explicit _D_e_c_i_s_i_o_n_T_r_e_e(const Y& y); │ │ │ │ -180 │ │ │ │ -188 _D_e_c_i_s_i_o_n_T_r_e_e(const L& label, const Y& y1, const Y& y2); │ │ │ │ -189 │ │ │ │ -191 _D_e_c_i_s_i_o_n_T_r_e_e(const _L_a_b_e_l_C& label, const Y& y1, const Y& y2); │ │ │ │ -192 │ │ │ │ -194 _D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, const std::vector& ys); │ │ │ │ -195 │ │ │ │ -197 _D_e_c_i_s_i_o_n_T_r_e_e(const std::vector& labelCs, const std::string& table); │ │ │ │ -198 │ │ │ │ -200 template │ │ │ │ -201 _D_e_c_i_s_i_o_n_T_r_e_e(Iterator begin, Iterator end, const L& label); │ │ │ │ -202 │ │ │ │ -204 _D_e_c_i_s_i_o_n_T_r_e_e(const L& label, const _D_e_c_i_s_i_o_n_T_r_e_e& f0, │ │ │ │ -205 const _D_e_c_i_s_i_o_n_T_r_e_e& f1); │ │ │ │ -206 │ │ │ │ -214 template │ │ │ │ -215 _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, Func Y_of_X); │ │ │ │ -216 │ │ │ │ -227 template │ │ │ │ -228 _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, const std::map& map, │ │ │ │ -229 Func Y_of_X); │ │ │ │ -230 │ │ │ │ -234 │ │ │ │ -242 void _p_r_i_n_t(const std::string& s, const LabelFormatter& labelFormatter, │ │ │ │ -243 const ValueFormatter& valueFormatter) const; │ │ │ │ -244 │ │ │ │ -245 // Testable │ │ │ │ -246 bool _e_q_u_a_l_s(const _D_e_c_i_s_i_o_n_T_r_e_e& other, │ │ │ │ -247 const CompareFunc& compare = &_D_e_f_a_u_l_t_C_o_m_p_a_r_e) const; │ │ │ │ -248 │ │ │ │ -252 │ │ │ │ -_2_5_4 virtual _~_D_e_c_i_s_i_o_n_T_r_e_e() = default; │ │ │ │ -255 │ │ │ │ -_2_5_7 bool _e_m_p_t_y() const { return !_r_o_o_t__; } │ │ │ │ -258 │ │ │ │ -260 bool _o_p_e_r_a_t_o_r_=_=(const _D_e_c_i_s_i_o_n_T_r_e_e& q) const; │ │ │ │ -261 │ │ │ │ -263 const Y& _o_p_e_r_a_t_o_r_(_)(const _A_s_s_i_g_n_m_e_n_t_<_L_>& x) const; │ │ │ │ -264 │ │ │ │ -279 template │ │ │ │ -280 void _v_i_s_i_t(Func f) const; │ │ │ │ -281 │ │ │ │ -296 template │ │ │ │ -297 void _v_i_s_i_t_L_e_a_f(Func f) const; │ │ │ │ -298 │ │ │ │ -313 template │ │ │ │ -314 void _v_i_s_i_t_W_i_t_h(Func f) const; │ │ │ │ -315 │ │ │ │ -317 size_t _n_r_L_e_a_v_e_s() const; │ │ │ │ -318 │ │ │ │ -334 template │ │ │ │ -335 X _f_o_l_d(Func f, X x0) const; │ │ │ │ -336 │ │ │ │ -338 std::set _l_a_b_e_l_s() const; │ │ │ │ -339 │ │ │ │ -341 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const _U_n_a_r_y& op) const; │ │ │ │ -342 │ │ │ │ -351 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const UnaryAssignment& op) const; │ │ │ │ -352 │ │ │ │ -354 _D_e_c_i_s_i_o_n_T_r_e_e _a_p_p_l_y(const _D_e_c_i_s_i_o_n_T_r_e_e& g, const Binary& op) const; │ │ │ │ -355 │ │ │ │ -_3_5_8 _D_e_c_i_s_i_o_n_T_r_e_e _c_h_o_o_s_e(const L& label, size_t index) const { │ │ │ │ -359 _N_o_d_e_P_t_r newRoot = _r_o_o_t__->_c_h_o_o_s_e(label, index); │ │ │ │ -360 return _D_e_c_i_s_i_o_n_T_r_e_e(newRoot); │ │ │ │ -361 } │ │ │ │ -362 │ │ │ │ -364 _D_e_c_i_s_i_o_n_T_r_e_e combine(const L& label, size_t cardinality, │ │ │ │ -365 const Binary& op) const; │ │ │ │ -366 │ │ │ │ -_3_6_8 _D_e_c_i_s_i_o_n_T_r_e_e _c_o_m_b_i_n_e(const _L_a_b_e_l_C& labelC, const Binary& op) const { │ │ │ │ -369 return _c_o_m_b_i_n_e(labelC.first, labelC.second, op); │ │ │ │ -370 } │ │ │ │ -371 │ │ │ │ -373 void _d_o_t(std::ostream& os, const LabelFormatter& labelFormatter, │ │ │ │ -374 const ValueFormatter& valueFormatter, bool showZero = true) const; │ │ │ │ -375 │ │ │ │ -377 void _d_o_t(const std::string& name, const LabelFormatter& labelFormatter, │ │ │ │ -378 const ValueFormatter& valueFormatter, bool showZero = true) const; │ │ │ │ -379 │ │ │ │ -381 std::string _d_o_t(const LabelFormatter& labelFormatter, │ │ │ │ -382 const ValueFormatter& valueFormatter, │ │ │ │ -383 bool showZero = true) const; │ │ │ │ -384 │ │ │ │ -387 │ │ │ │ -388 // internal use only │ │ │ │ -389 explicit _D_e_c_i_s_i_o_n_T_r_e_e(const _N_o_d_e_P_t_r& root); │ │ │ │ -390 │ │ │ │ -391 // internal use only │ │ │ │ -392 template _N_o_d_e_P_t_r │ │ │ │ -393 compose(Iterator begin, Iterator end, const L& label) const; │ │ │ │ -394 │ │ │ │ -396 │ │ │ │ -397 private: │ │ │ │ -_3_9_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; │ │ │ │ -400 template │ │ │ │ -401 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ -402 ar& BOOST_SERIALIZATION_NVP(_r_o_o_t__); │ │ │ │ -403 } │ │ │ │ -404 }; // DecisionTree │ │ │ │ -405 │ │ │ │ -406 template │ │ │ │ -_4_0_7 struct _t_r_a_i_t_s<_D_e_c_i_s_i_o_n_T_r_e_e> : public _T_e_s_t_a_b_l_e> {}; │ │ │ │ -408 │ │ │ │ -412 template │ │ │ │ -_4_1_3 _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_<_L_,_ _Y_>& f, │ │ │ │ -414 const typename _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>_:_:_U_n_a_r_y& op) { │ │ │ │ -415 return f._a_p_p_l_y(op); │ │ │ │ -416 } │ │ │ │ -417 │ │ │ │ -419 template │ │ │ │ -_4_2_0 _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_<_L_,_ _Y_>& f, │ │ │ │ -421 const typename DecisionTree::UnaryAssignment& op) { │ │ │ │ -422 return f._a_p_p_l_y(op); │ │ │ │ -423 } │ │ │ │ -424 │ │ │ │ -426 template │ │ │ │ -_4_2_7 _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_<_L_,_ _Y_>& f, │ │ │ │ -428 const _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _Y_>& g, │ │ │ │ -429 const typename DecisionTree::Binary& op) { │ │ │ │ -430 return f._a_p_p_l_y(g, op); │ │ │ │ -431 } │ │ │ │ -432 │ │ │ │ -439 template │ │ │ │ -_4_4_0 std::pair, _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_2_> > _u_n_z_i_p( │ │ │ │ -441 const _D_e_c_i_s_i_o_n_T_r_e_e >& input) { │ │ │ │ -442 return std::make_pair( │ │ │ │ -443 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_1_>(input, [](std::pair i) { return i.first; }), │ │ │ │ -444 _D_e_c_i_s_i_o_n_T_r_e_e_<_L_,_ _T_2_>(input, │ │ │ │ -445 [](std::pair i) { return i.second; })); │ │ │ │ -446 } │ │ │ │ -447 │ │ │ │ -448} // namespace gtsam │ │ │ │ -_t_y_p_e_s_._h │ │ │ │ -Typedefs for easier changing of types. │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_A_s_s_i_g_n_m_e_n_t_._h │ │ │ │ -An assignment from labels to a discrete value index (size_t) │ │ │ │ +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 │ │ │ │ +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_:_:_u_n_z_i_p │ │ │ │ -std::pair< DecisionTree< L, T1 >, DecisionTree< L, T2 > > unzip(const │ │ │ │ -DecisionTree< L, std::pair< T1, T2 > > &input) │ │ │ │ -unzip a DecisionTree with std::pair values. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:440 │ │ │ │ -_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_:_:_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_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_:_:_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 │ │ │ │ -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_h_o_o_s_e │ │ │ │ -DecisionTree choose(const L &label, size_t index) const │ │ │ │ -create a new function where value(label)==index It's like "restrict" in │ │ │ │ -Darwiche09book pg329,... │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:358 │ │ │ │ -_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_o_m_b_i_n_e │ │ │ │ -DecisionTree combine(const LabelC &labelC, const Binary &op) const │ │ │ │ -combine with LabelC for convenience │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:368 │ │ │ │ -_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_:_:_~_D_e_c_i_s_i_o_n_T_r_e_e │ │ │ │ -virtual ~DecisionTree()=default │ │ │ │ -Make virtual. │ │ │ │ -_g_t_s_a_m_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_D_e_f_a_u_l_t_C_o_m_p_a_r_e │ │ │ │ -static bool DefaultCompare(const Y &a, const Y &b) │ │ │ │ -Default method for comparison of two objects of type Y. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:64 │ │ │ │ -_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_:_:_D_e_c_i_s_i_o_n_T_r_e_e_:_:_N_o_d_e_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn DecisionTree.h:135 │ │ │ │ +_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 │ │ │ │ +_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_._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/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/DiscreteDistribution.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,48 +96,41 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
AlgebraicDecisionTree.h File Reference
│ │ │ +
DiscreteDistribution.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...
class  gtsam::DiscreteDistribution
 A prior probability on a set of discrete variables. More...
 
struct  gtsam::traits< AlgebraicDecisionTree< T > >
struct  gtsam::traits< DiscreteDistribution >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Algebraic Decision Trees.

│ │ │ +
Date
December 2021
│ │ │
Author
Frank Dellaert
│ │ │ -
Date
Mar 14, 2011
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +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 │ │ │ │ -AlgebraicDecisionTree.h File Reference │ │ │ │ -Algebraic Decision Trees. _M_o_r_e_._._. │ │ │ │ +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_:_:_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_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_:_:_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_ _>_ _> │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Algebraic Decision Trees. │ │ │ │ + Date │ │ │ │ + December 2021 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Mar 14, 2011 │ │ │ │ * _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_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/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::traits< DiscreteDistribution >", "a02844.html", null] │ │ │ │ ]; │ │ ├── ./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/DiscreteDistribution.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,217 +98,105 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
AlgebraicDecisionTree.h
│ │ │ +
DiscreteDistribution.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 };
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ +
21
│ │ │ +
22#include <string>
│ │ │ +
23#include <vector>
│ │ │ +
24
│ │ │ +
25namespace gtsam {
│ │ │ +
26
│ │ │ +
│ │ │ +
33class GTSAM_EXPORT DiscreteDistribution : public DiscreteConditional {
│ │ │ +
34 public:
│ │ │ + │ │ │ +
36
│ │ │ +
39
│ │ │ + │ │ │ +
42
│ │ │ +
│ │ │ + │ │ │ +
45 : Base(f.size(), f) {}
│ │ │ +
│ │ │ +
46
│ │ │ +
52 explicit DiscreteDistribution(const Signature& s) : Base(s) {}
│ │ │ +
53
│ │ │ +
│ │ │ +
60 DiscreteDistribution(const DiscreteKey& key, const std::vector<double>& spec)
│ │ │ +
61 : DiscreteDistribution(Signature(key, {}, Signature::Table{spec})) {}
│ │ │ +
│ │ │ +
62
│ │ │ +
│ │ │ +
69 DiscreteDistribution(const DiscreteKey& key, const std::string& spec)
│ │ │ +
70 : DiscreteDistribution(Signature(key, {}, spec)) {}
│ │ │
│ │ │ -
73
│ │ │ -
74 AlgebraicDecisionTree(double leaf = 1.0) : Base(leaf) {}
│ │ │ +
71
│ │ │
75
│ │ │ -
76 // Explicitly non-explicit constructor
│ │ │ -
77 AlgebraicDecisionTree(const Base& add) : Base(add) {}
│ │ │ -
78
│ │ │ -
│ │ │ -
80 AlgebraicDecisionTree(const L& label, double y1, double y2)
│ │ │ -
81 : Base(label, y1, y2) {}
│ │ │ -
│ │ │ -
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.
│ │ │ +
77 void print(
│ │ │ +
78 const std::string& s = "Discrete Prior: ",
│ │ │ +
79 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │ +
80
│ │ │ +
84
│ │ │ +
86 double operator()(size_t value) const;
│ │ │ +
87
│ │ │ +
89 // TODO(dellaert): does not play well with wrapper!
│ │ │ +
90 // using Base::operator();
│ │ │ +
91
│ │ │ +
93 std::vector<double> pmf() const;
│ │ │ +
94
│ │ │ +
96#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ +
99 size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); }
│ │ │ +
101#endif
│ │ │ +
102};
│ │ │ +
│ │ │ +
103// DiscreteDistribution
│ │ │ +
104
│ │ │ +
105// traits
│ │ │ +
106template <>
│ │ │ +
107struct traits<DiscreteDistribution> : public Testable<DiscreteDistribution> {};
│ │ │ +
108
│ │ │ +
109} // 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
│ │ │ -
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
│ │ │ +
A discrete probabilistic factor.
Definition DecisionTreeFactor.h:45
│ │ │ +
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ +
A prior probability on a set of discrete variables.
Definition DiscreteDistribution.h:33
│ │ │ +
DiscreteDistribution(const Signature &s)
Construct from a Signature.
Definition DiscreteDistribution.h:52
│ │ │ +
DiscreteDistribution(const DiscreteKey &key, const std::vector< double > &spec)
Construct from key and a vector of floats specifying the probability mass function (PMF).
Definition DiscreteDistribution.h:60
│ │ │ +
DiscreteDistribution(const DiscreteKey &key, const std::string &spec)
Construct from key and a string specifying the probability mass function (PMF).
Definition DiscreteDistribution.h:69
│ │ │ +
DiscreteDistribution()
Default constructor needed for serialization.
Definition DiscreteDistribution.h:41
│ │ │ +
DiscreteDistribution(const DecisionTreeFactor &f)
Constructor from factor.
Definition DiscreteDistribution.h:44
│ │ │ +
Signature for a discrete conditional density, used to construct conditionals.
Definition Signature.h:54
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,238 +1,125 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -AlgebraicDecisionTree.h │ │ │ │ +DiscreteDistribution.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) {} │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_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> │ │ │ │ +21 │ │ │ │ +22#include │ │ │ │ +23#include │ │ │ │ +24 │ │ │ │ +25namespace _g_t_s_a_m { │ │ │ │ +26 │ │ │ │ +_3_3class GTSAM_EXPORT _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n : public _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ +34 public: │ │ │ │ +35 using _B_a_s_e = _D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ +36 │ │ │ │ +39 │ │ │ │ +_4_1 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n() {} │ │ │ │ +42 │ │ │ │ +_4_4 explicit _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r& f) │ │ │ │ +45 : _B_a_s_e(f.size(), f) {} │ │ │ │ +46 │ │ │ │ +_5_2 explicit _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _S_i_g_n_a_t_u_r_e& s) : _B_a_s_e(s) {} │ │ │ │ +53 │ │ │ │ +_6_0 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::vector& │ │ │ │ +spec) │ │ │ │ +61 : _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(_S_i_g_n_a_t_u_r_e(key, {}, Signature::Table{spec})) {} │ │ │ │ +62 │ │ │ │ +_6_9 _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(const _D_i_s_c_r_e_t_e_K_e_y& key, const std::string& spec) │ │ │ │ +70 : _D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n(_S_i_g_n_a_t_u_r_e(key, {}, spec)) {} │ │ │ │ +71 │ │ │ │ 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) {} │ │ │ │ -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) {} │ │ │ │ -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. │ │ │ │ +77 void print( │ │ │ │ +78 const std::string& s = "Discrete Prior: ", │ │ │ │ +79 const KeyFormatter& formatter = DefaultKeyFormatter) const override; │ │ │ │ +80 │ │ │ │ +84 │ │ │ │ +86 double operator()(size_t value) const; │ │ │ │ +87 │ │ │ │ +89 // TODO(dellaert): does not play well with wrapper! │ │ │ │ +90 // using Base::operator(); │ │ │ │ +91 │ │ │ │ +93 std::vector pmf() const; │ │ │ │ +94 │ │ │ │ +96#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ +99 size_t GTSAM_DEPRECATED solve() const { return Base::solve({}); } │ │ │ │ +101#endif │ │ │ │ +102}; │ │ │ │ +103// DiscreteDistribution │ │ │ │ +104 │ │ │ │ +105// traits │ │ │ │ +106template <> │ │ │ │ +_1_0_7struct _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> : public _T_e_s_t_a_b_l_e │ │ │ │ +{}; │ │ │ │ +108 │ │ │ │ +109} // namespace gtsam │ │ │ │ +_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._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_:_:_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_:_:_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_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +A prior probability on a set of discrete variables. │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:33 │ │ │ │ +_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +DiscreteDistribution(const Signature &s) │ │ │ │ +Construct from a Signature. │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:52 │ │ │ │ +_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +DiscreteDistribution(const DiscreteKey &key, const std::vector< double > &spec) │ │ │ │ +Construct from key and a vector of floats specifying the probability mass │ │ │ │ +function (PMF). │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:60 │ │ │ │ +_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +DiscreteDistribution(const DiscreteKey &key, const std::string &spec) │ │ │ │ +Construct from key and a string specifying the probability mass function (PMF). │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:69 │ │ │ │ +_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +DiscreteDistribution() │ │ │ │ +Default constructor needed for serialization. │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:41 │ │ │ │ +_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_:_:_D_i_s_c_r_e_t_e_D_i_s_t_r_i_b_u_t_i_o_n │ │ │ │ +DiscreteDistribution(const DecisionTreeFactor &f) │ │ │ │ +Constructor from factor. │ │ │ │ +DDeeffiinniittiioonn DiscreteDistribution.h:44 │ │ │ │ +_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 │ │ │ │ * _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_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/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/DecisionTreeFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,35 +95,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
AlgebraicDecisionTree.cpp File Reference
│ │ │ +
DecisionTreeFactor.cpp File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

discrete factor │ │ │ +More...

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
Feb 20, 2022
│ │ │ -
Author
Mike Sheffler
│ │ │ -
│ │ │ -Duy-Nguyen Ta
│ │ │ +

discrete factor

│ │ │ +
Date
Feb 14, 2011
│ │ │ +
Author
Duy-Nguyen Ta
│ │ │
│ │ │ Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -AlgebraicDecisionTree.cpp File Reference │ │ │ │ +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 │ │ │ │ - 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_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/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/CameraSet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,192 +95,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
triangulation.h File Reference
│ │ │ +Namespaces
│ │ │ +
CameraSet.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Functions for triangulation. │ │ │ +

Base class to create smart factors on poses or cameras. │ │ │ 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::CameraSet< CAMERA >
 A set of cameras, all with their own calibration. More...
 
class  gtsam::TriangulationCheiralityException
 Exception thrown by triangulateDLT when landmark is behind one or more of the cameras. More...
struct  gtsam::traits< CameraSet< 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 CameraSet< 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
│ │ │ +

Base class to create smart factors on poses or cameras.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
Feb 19, 2015
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,295 +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 │ │ │ │ -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 │ │ │ │ +CameraSet.h File Reference │ │ │ │ +Base class to create smart factors on poses or 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_:_:_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_:_:_C_a_m_e_r_a_S_e_t_<_ _C_A_M_E_R_A_ _> │ │ │ │ +  A set of cameras, all with their own 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_<_ _C_a_m_e_r_a_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_ _C_a_m_e_r_a_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 │ │ │ │ +Base class to create smart factors on poses or cameras. │ │ │ │ Author │ │ │ │ - Chris Beall │ │ │ │ - Akshay Krishnan │ │ │ │ + Frank Dellaert │ │ │ │ Date │ │ │ │ - July 31, 2013 │ │ │ │ - Author │ │ │ │ - Chris Beall │ │ │ │ - Luca Carlone │ │ │ │ - Akshay Krishnan │ │ │ │ + Feb 19, 2015 │ │ │ │ * _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 │ │ │ │ + * _C_a_m_e_r_a_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::CameraSet< CAMERA >", "a03044.html", "a03044"], │ │ │ │ + ["gtsam::traits< CameraSet< CAMERA > >", "a03048.html", null], │ │ │ │ + ["gtsam::traits< const CameraSet< CAMERA > >", "a03052.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/CameraSet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,675 +98,494 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
triangulation.h
│ │ │ +
CameraSet.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>
│ │ │ -
35
│ │ │ -
36namespace gtsam {
│ │ │ -
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);
│ │ │ -
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}
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ +
21#include <gtsam/base/FastMap.h>
│ │ │ + │ │ │ +
23#include <gtsam/base/Testable.h>
│ │ │ +
24#include <gtsam/geometry/CalibratedCamera.h> // for Cheirality exception
│ │ │ + │ │ │ +
26#include <gtsam/inference/Key.h>
│ │ │ +
27
│ │ │ +
28#include <vector>
│ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
35template <class CAMERA>
│ │ │ +
│ │ │ +
36class CameraSet : public std::vector<CAMERA, Eigen::aligned_allocator<CAMERA>> {
│ │ │ +
37 protected:
│ │ │ +
38 using Base = std::vector<CAMERA, typename Eigen::aligned_allocator<CAMERA>>;
│ │ │ +
39
│ │ │ +
44 typedef typename CAMERA::Measurement Z;
│ │ │ +
45 typedef typename CAMERA::MeasurementVector ZVector;
│ │ │ +
46
│ │ │ +
47 static const int D = traits<CAMERA>::dimension;
│ │ │ +
48 static const int ZDim = traits<Z>::dimension;
│ │ │ +
49
│ │ │ +
│ │ │ +
51 static Vector ErrorVector(const ZVector& predicted, const ZVector& measured) {
│ │ │ +
52 // Check size
│ │ │ +
53 size_t m = predicted.size();
│ │ │ +
54 if (measured.size() != m)
│ │ │ +
55 throw std::runtime_error("CameraSet::errors: size mismatch");
│ │ │ +
56
│ │ │ +
57 // Project and fill error vector
│ │ │ +
58 Vector b(ZDim * m);
│ │ │ +
59 for (size_t i = 0, row = 0; i < m; i++, row += ZDim) {
│ │ │ +
60 Vector bi = traits<Z>::Local(measured[i], predicted[i]);
│ │ │ +
61 if (ZDim == 3 && std::isnan(bi(1))) { // if it is a stereo point and the
│ │ │ +
62 // right pixel is missing (nan)
│ │ │ +
63 bi(1) = 0;
│ │ │ +
64 }
│ │ │ +
65 b.segment<ZDim>(row) = bi;
│ │ │ +
66 }
│ │ │ +
67 return b;
│ │ │ +
68 }
│ │ │ +
│ │ │ +
69
│ │ │ +
70 public:
│ │ │ +
71 using Base::Base; // Inherit the vector constructors
│ │ │ +
72
│ │ │ +
74 virtual ~CameraSet() = default;
│ │ │ +
75
│ │ │ +
77 using MatrixZD = Eigen::Matrix<double, ZDim, D>;
│ │ │ +
78 using FBlocks = std::vector<MatrixZD, Eigen::aligned_allocator<MatrixZD>>;
│ │ │ +
79
│ │ │ +
│ │ │ +
85 virtual void print(const std::string& s = "") const {
│ │ │ +
86 std::cout << s << "CameraSet, cameras = \n";
│ │ │ +
87 for (size_t k = 0; k < this->size(); ++k) this->at(k).print(s);
│ │ │ +
88 }
│ │ │
│ │ │ -
139
│ │ │ -
149template<class CAMERA>
│ │ │ +
89
│ │ │ +
│ │ │ +
91 bool equals(const CameraSet& p, double tol = 1e-9) const {
│ │ │ +
92 if (this->size() != p.size()) return false;
│ │ │ +
93 bool camerasAreEqual = true;
│ │ │ +
94 for (size_t i = 0; i < this->size(); i++) {
│ │ │ +
95 if (this->at(i).equals(p.at(i), tol) == false) camerasAreEqual = false;
│ │ │ +
96 break;
│ │ │ +
97 }
│ │ │ +
98 return camerasAreEqual;
│ │ │ +
99 }
│ │ │ +
│ │ │ +
100
│ │ │ +
107 template <class POINT>
│ │ │ +
│ │ │ +
108 ZVector project2(const POINT& point, //
│ │ │ +
109 boost::optional<FBlocks&> Fs = boost::none, //
│ │ │ +
110 boost::optional<Matrix&> E = boost::none) const {
│ │ │ +
111 static const int N = FixedDimension<POINT>::value;
│ │ │ +
112
│ │ │ +
113 // Allocate result
│ │ │ +
114 size_t m = this->size();
│ │ │ +
115 ZVector z;
│ │ │ +
116 z.reserve(m);
│ │ │ +
117
│ │ │ +
118 // Allocate derivatives
│ │ │ +
119 if (E) E->resize(ZDim * m, N);
│ │ │ +
120 if (Fs) Fs->resize(m);
│ │ │ +
121
│ │ │ +
122 // Project and fill derivatives
│ │ │ +
123 for (size_t i = 0; i < m; i++) {
│ │ │ +
124 MatrixZD Fi;
│ │ │ +
125 Eigen::Matrix<double, ZDim, N> Ei;
│ │ │ +
126 z.emplace_back(this->at(i).project2(point, Fs ? &Fi : 0, E ? &Ei : 0));
│ │ │ +
127 if (Fs) (*Fs)[i] = Fi;
│ │ │ +
128 if (E) E->block<ZDim, N>(ZDim * i, 0) = Ei;
│ │ │ +
129 }
│ │ │ +
130
│ │ │ +
131 return z;
│ │ │ +
132 }
│ │ │ +
│ │ │ +
133
│ │ │ +
135 template <class POINT>
│ │ │ +
│ │ │ +
136 Vector reprojectionError(const POINT& point, const ZVector& measured,
│ │ │ +
137 boost::optional<FBlocks&> Fs = boost::none, //
│ │ │ +
138 boost::optional<Matrix&> E = boost::none) const {
│ │ │ +
139 return ErrorVector(project2(point, Fs, E), measured);
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
148 template <int N,
│ │ │ +
149 int ND> // N = 2 or 3 (point dimension), ND is the camera dimension
│ │ │
│ │ │ -
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]);
│ │ │ + │ │ │ +
151 const std::vector<
│ │ │ +
152 Eigen::Matrix<double, ZDim, ND>,
│ │ │ +
153 Eigen::aligned_allocator<Eigen::Matrix<double, ZDim, ND>>>& Fs,
│ │ │ +
154 const Matrix& E, const Eigen::Matrix<double, N, N>& P, const Vector& b) {
│ │ │ +
155 // a single point is observed in m cameras
│ │ │ +
156 size_t m = Fs.size();
│ │ │ +
157
│ │ │ +
158 // Create a SymmetricBlockMatrix (augmented hessian, with extra row/column
│ │ │ +
159 // with info vector)
│ │ │ +
160 size_t M1 = ND * m + 1;
│ │ │ +
161 std::vector<DenseIndex> dims(m + 1); // this also includes the b term
│ │ │ +
162 std::fill(dims.begin(), dims.end() - 1, ND);
│ │ │ +
163 dims.back() = 1;
│ │ │ +
164 SymmetricBlockMatrix augmentedHessian(dims, Matrix::Zero(M1, M1));
│ │ │ +
165
│ │ │ +
166 // Blockwise Schur complement
│ │ │ +
167 for (size_t i = 0; i < m; i++) { // for each camera
│ │ │ +
168
│ │ │ +
169 const Eigen::Matrix<double, ZDim, ND>& Fi = Fs[i];
│ │ │ +
170 const auto FiT = Fi.transpose();
│ │ │ +
171 const Eigen::Matrix<double, ZDim, N> Ei_P = //
│ │ │ +
172 E.block(ZDim * i, 0, ZDim, N) * P;
│ │ │ +
173
│ │ │ +
174 // D = (Dx2) * ZDim
│ │ │ +
175 augmentedHessian.setOffDiagonalBlock(
│ │ │ +
176 i, m,
│ │ │ +
177 FiT * b.segment<ZDim>(ZDim * i) // F' * b
│ │ │ +
178 -
│ │ │ +
179 FiT *
│ │ │ +
180 (Ei_P *
│ │ │ +
181 (E.transpose() *
│ │ │ +
182 b))); // D = (DxZDim) * (ZDimx3) * (N*ZDimm) * (ZDimm x 1)
│ │ │ +
183
│ │ │ +
184 // (DxD) = (DxZDim) * ( (ZDimxD) - (ZDimx3) * (3xZDim) * (ZDimxD) )
│ │ │ +
185 augmentedHessian.setDiagonalBlock(
│ │ │ +
186 i,
│ │ │ +
187 FiT * (Fi - Ei_P * E.block(ZDim * i, 0, ZDim, N).transpose() * Fi));
│ │ │ +
188
│ │ │ +
189 // upper triangular part of the hessian
│ │ │ +
190 for (size_t j = i + 1; j < m; j++) { // for each camera
│ │ │ +
191 const Eigen::Matrix<double, ZDim, ND>& Fj = Fs[j];
│ │ │ +
192
│ │ │ +
193 // (DxD) = (Dx2) * ( (2x2) * (2xD) )
│ │ │ +
194 augmentedHessian.setOffDiagonalBlock(
│ │ │ +
195 i, j,
│ │ │ +
196 -FiT * (Ei_P * E.block(ZDim * j, 0, ZDim, N).transpose() * Fj));
│ │ │ +
197 }
│ │ │ +
198 } // end of for over cameras
│ │ │ +
199
│ │ │ +
200 augmentedHessian.diagonalBlock(m)(0, 0) += b.squaredNorm();
│ │ │ +
201 return augmentedHessian;
│ │ │ +
202 }
│ │ │ +
│ │ │ +
203
│ │ │ +
217 template <int N, int ND, int NDD>
│ │ │ +
│ │ │ + │ │ │ +
219 const std::vector<
│ │ │ +
220 Eigen::Matrix<double, ZDim, ND>,
│ │ │ +
221 Eigen::aligned_allocator<Eigen::Matrix<double, ZDim, ND>>>& Fs,
│ │ │ +
222 const Matrix& E, const Eigen::Matrix<double, N, N>& P, const Vector& b,
│ │ │ +
223 const KeyVector& jacobianKeys, const KeyVector& hessianKeys) {
│ │ │ +
224 size_t nrNonuniqueKeys = jacobianKeys.size();
│ │ │ +
225 size_t nrUniqueKeys = hessianKeys.size();
│ │ │ +
226
│ │ │ +
227 // Marginalize point: note - we reuse the standard SchurComplement function.
│ │ │ +
228 SymmetricBlockMatrix augmentedHessian = SchurComplement<N, ND>(Fs, E, P, b);
│ │ │ +
229
│ │ │ +
230 // Pack into an Hessian factor, allow space for b term.
│ │ │ +
231 std::vector<DenseIndex> dims(nrUniqueKeys + 1);
│ │ │ +
232 std::fill(dims.begin(), dims.end() - 1, NDD);
│ │ │ +
233 dims.back() = 1;
│ │ │ +
234 SymmetricBlockMatrix augmentedHessianUniqueKeys;
│ │ │ +
235
│ │ │ +
236 // Deal with the fact that some blocks may share the same keys.
│ │ │ +
237 if (nrUniqueKeys == nrNonuniqueKeys) {
│ │ │ +
238 // Case when there is 1 calibration key per camera:
│ │ │ +
239 augmentedHessianUniqueKeys = SymmetricBlockMatrix(
│ │ │ +
240 dims, Matrix(augmentedHessian.selfadjointView()));
│ │ │ +
241 } else {
│ │ │ +
242 // When multiple cameras share a calibration we have to rearrange
│ │ │ +
243 // the results of the Schur complement matrix.
│ │ │ +
244 std::vector<DenseIndex> nonuniqueDims(nrNonuniqueKeys + 1); // includes b
│ │ │ +
245 std::fill(nonuniqueDims.begin(), nonuniqueDims.end() - 1, NDD);
│ │ │ +
246 nonuniqueDims.back() = 1;
│ │ │ +
247 augmentedHessian = SymmetricBlockMatrix(
│ │ │ +
248 nonuniqueDims, Matrix(augmentedHessian.selfadjointView()));
│ │ │ +
249
│ │ │ +
250 // Get map from key to location in the new augmented Hessian matrix (the
│ │ │ +
251 // one including only unique keys).
│ │ │ +
252 std::map<Key, size_t> keyToSlotMap;
│ │ │ +
253 for (size_t k = 0; k < nrUniqueKeys; k++) {
│ │ │ +
254 keyToSlotMap[hessianKeys[k]] = k;
│ │ │ +
255 }
│ │ │ +
256
│ │ │ +
257 // Initialize matrix to zero.
│ │ │ +
258 augmentedHessianUniqueKeys = SymmetricBlockMatrix(
│ │ │ +
259 dims, Matrix::Zero(NDD * nrUniqueKeys + 1, NDD * nrUniqueKeys + 1));
│ │ │ +
260
│ │ │ +
261 // Add contributions for each key: note this loops over the hessian with
│ │ │ +
262 // nonUnique keys (augmentedHessian) and populates an Hessian that only
│ │ │ +
263 // includes the unique keys (that is what we want to return).
│ │ │ +
264 for (size_t i = 0; i < nrNonuniqueKeys; i++) { // rows
│ │ │ +
265 Key key_i = jacobianKeys.at(i);
│ │ │ +
266
│ │ │ +
267 // Update information vector.
│ │ │ +
268 augmentedHessianUniqueKeys.updateOffDiagonalBlock(
│ │ │ +
269 keyToSlotMap[key_i], nrUniqueKeys,
│ │ │ +
270 augmentedHessian.aboveDiagonalBlock(i, nrNonuniqueKeys));
│ │ │ +
271
│ │ │ +
272 // Update blocks.
│ │ │ +
273 for (size_t j = i; j < nrNonuniqueKeys; j++) { // cols
│ │ │ +
274 Key key_j = jacobianKeys.at(j);
│ │ │ +
275 if (i == j) {
│ │ │ +
276 augmentedHessianUniqueKeys.updateDiagonalBlock(
│ │ │ +
277 keyToSlotMap[key_i], augmentedHessian.diagonalBlock(i));
│ │ │ +
278 } else { // (i < j)
│ │ │ +
279 if (keyToSlotMap[key_i] != keyToSlotMap[key_j]) {
│ │ │ +
280 augmentedHessianUniqueKeys.updateOffDiagonalBlock(
│ │ │ +
281 keyToSlotMap[key_i], keyToSlotMap[key_j],
│ │ │ +
282 augmentedHessian.aboveDiagonalBlock(i, j));
│ │ │ +
283 } else {
│ │ │ +
284 augmentedHessianUniqueKeys.updateDiagonalBlock(
│ │ │ +
285 keyToSlotMap[key_i],
│ │ │ +
286 augmentedHessian.aboveDiagonalBlock(i, j) +
│ │ │ +
287 augmentedHessian.aboveDiagonalBlock(i, j).transpose());
│ │ │ +
288 }
│ │ │ +
289 }
│ │ │ +
290 }
│ │ │ +
291 }
│ │ │ +
292
│ │ │ +
293 // Update bottom right element of the matrix.
│ │ │ +
294 augmentedHessianUniqueKeys.updateDiagonalBlock(
│ │ │ +
295 nrUniqueKeys, augmentedHessian.diagonalBlock(nrNonuniqueKeys));
│ │ │ +
296 }
│ │ │ +
297 return augmentedHessianUniqueKeys;
│ │ │ +
298 }
│ │ │ +
│ │ │ +
299
│ │ │ +
306 template <int N> // N = 2 or 3
│ │ │ +
│ │ │ + │ │ │ +
308 const FBlocks& Fs, const Matrix& E, const Eigen::Matrix<double, N, N>& P,
│ │ │ +
309 const Vector& b) {
│ │ │ +
310 return SchurComplement<N, D>(Fs, E, P, b);
│ │ │ +
311 }
│ │ │ +
│ │ │ +
312
│ │ │ +
314 template <int N> // N = 2 or 3 (point dimension)
│ │ │ +
│ │ │ +
315 static void ComputePointCovariance(Eigen::Matrix<double, N, N>& P,
│ │ │ +
316 const Matrix& E, double lambda,
│ │ │ +
317 bool diagonalDamping = false) {
│ │ │ +
318 Matrix EtE = E.transpose() * E;
│ │ │ +
319
│ │ │ +
320 if (diagonalDamping) { // diagonal of the hessian
│ │ │ +
321 EtE.diagonal() += lambda * EtE.diagonal();
│ │ │ +
322 } else {
│ │ │ +
323 DenseIndex n = E.cols();
│ │ │ +
324 EtE += lambda * Eigen::MatrixXd::Identity(n, n);
│ │ │ +
325 }
│ │ │ +
326
│ │ │ +
327 P = (EtE).inverse();
│ │ │
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());
│ │ │ +
329
│ │ │ +
│ │ │ +
331 static Matrix PointCov(const Matrix& E, const double lambda = 0.0,
│ │ │ +
332 bool diagonalDamping = false) {
│ │ │ +
333 if (E.cols() == 2) {
│ │ │ +
334 Matrix2 P2;
│ │ │ +
335 ComputePointCovariance<2>(P2, E, lambda, diagonalDamping);
│ │ │ +
336 return P2;
│ │ │ +
337 } else {
│ │ │ +
338 Matrix3 P3;
│ │ │ +
339 ComputePointCovariance<3>(P3, E, lambda, diagonalDamping);
│ │ │ +
340 return P3;
│ │ │ +
341 }
│ │ │ +
342 }
│ │ │ +
│ │ │ +
343
│ │ │ +
│ │ │ +
348 static SymmetricBlockMatrix SchurComplement(const FBlocks& Fblocks,
│ │ │ +
349 const Matrix& E, const Vector& b,
│ │ │ +
350 const double lambda = 0.0,
│ │ │ +
351 bool diagonalDamping = false) {
│ │ │ +
352 if (E.cols() == 2) {
│ │ │ +
353 Matrix2 P;
│ │ │ +
354 ComputePointCovariance<2>(P, E, lambda, diagonalDamping);
│ │ │ +
355 return SchurComplement<2>(Fblocks, E, P, b);
│ │ │ +
356 } else {
│ │ │ +
357 Matrix3 P;
│ │ │ +
358 ComputePointCovariance<3>(P, E, lambda, diagonalDamping);
│ │ │ +
359 return SchurComplement<3>(Fblocks, E, P, b);
│ │ │ +
360 }
│ │ │ +
361 }
│ │ │ +
│ │ │ +
362
│ │ │ +
368 template <int N> // N = 2 or 3 (point dimension)
│ │ │ +
│ │ │ + │ │ │ +
370 const FBlocks& Fs, const Matrix& E, const Eigen::Matrix<double, N, N>& P,
│ │ │ +
371 const Vector& b, const KeyVector& allKeys, const KeyVector& keys,
│ │ │ +
372 /*output ->*/ SymmetricBlockMatrix& augmentedHessian) {
│ │ │ +
373 assert(keys.size() == Fs.size());
│ │ │ +
374 assert(keys.size() <= allKeys.size());
│ │ │ +
375
│ │ │ +
376 FastMap<Key, size_t> KeySlotMap;
│ │ │ +
377 for (size_t slot = 0; slot < allKeys.size(); slot++)
│ │ │ +
378 KeySlotMap.insert(std::make_pair(allKeys[slot], slot));
│ │ │ +
379
│ │ │ +
380 // Schur complement trick
│ │ │ +
381 // G = F' * F - F' * E * P * E' * F
│ │ │ +
382 // g = F' * (b - E * P * E' * b)
│ │ │ +
383
│ │ │ +
384 // a single point is observed in m cameras
│ │ │ +
385 size_t m = Fs.size(); // cameras observing current point
│ │ │ +
386 size_t M = (augmentedHessian.rows() - 1) / D; // all cameras in the group
│ │ │ +
387 assert(allKeys.size() == M);
│ │ │ +
388
│ │ │ +
389 // Blockwise Schur complement
│ │ │ +
390 for (size_t i = 0; i < m; i++) { // for each camera in the current factor
│ │ │ +
391
│ │ │ +
392 const MatrixZD& Fi = Fs[i];
│ │ │ +
393 const auto FiT = Fi.transpose();
│ │ │ +
394 const Eigen::Matrix<double, 2, N> Ei_P =
│ │ │ +
395 E.template block<ZDim, N>(ZDim * i, 0) * P;
│ │ │ +
396
│ │ │ +
397 // D = (DxZDim) * (ZDim)
│ │ │ +
398 // allKeys are the list of all camera keys in the group, e.g, (1,3,4,5,7)
│ │ │ +
399 // we should map those to a slot in the local (grouped) hessian
│ │ │ +
400 // (0,1,2,3,4) Key cameraKey_i = this->keys_[i];
│ │ │ +
401 DenseIndex aug_i = KeySlotMap.at(keys[i]);
│ │ │ +
402
│ │ │ +
403 // information vector - store previous vector
│ │ │ +
404 // vectorBlock = augmentedHessian(aug_i, aug_m).knownOffDiagonal();
│ │ │ +
405 // add contribution of current factor
│ │ │ +
406 augmentedHessian.updateOffDiagonalBlock(
│ │ │ +
407 aug_i, M,
│ │ │ +
408 FiT * b.segment<ZDim>(ZDim * i) // F' * b
│ │ │ +
409 -
│ │ │ +
410 FiT *
│ │ │ +
411 (Ei_P *
│ │ │ +
412 (E.transpose() *
│ │ │ +
413 b))); // D = (DxZDim) * (ZDimx3) * (N*ZDimm) * (ZDimm x 1)
│ │ │ +
414
│ │ │ +
415 // (DxD) += (DxZDim) * ( (ZDimxD) - (ZDimx3) * (3xZDim) * (ZDimxD) )
│ │ │ +
416 // add contribution of current factor
│ │ │ +
417 // TODO(gareth): Eigen doesn't let us pass the expression. Call eval() for
│ │ │ +
418 // now...
│ │ │ +
419 augmentedHessian.updateDiagonalBlock(
│ │ │ +
420 aug_i,
│ │ │ +
421 ((FiT *
│ │ │ +
422 (Fi -
│ │ │ +
423 Ei_P * E.template block<ZDim, N>(ZDim * i, 0).transpose() * Fi)))
│ │ │ +
424 .eval());
│ │ │ +
425
│ │ │ +
426 // upper triangular part of the hessian
│ │ │ +
427 for (size_t j = i + 1; j < m; j++) { // for each camera
│ │ │ +
428 const MatrixZD& Fj = Fs[j];
│ │ │
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);
│ │ │ +
430 DenseIndex aug_j = KeySlotMap.at(keys[j]);
│ │ │ +
431
│ │ │ +
432 // (DxD) = (DxZDim) * ( (ZDimxZDim) * (ZDimxD) )
│ │ │ +
433 // off diagonal block - store previous block
│ │ │ +
434 // matrixBlock = augmentedHessian(aug_i, aug_j).knownOffDiagonal();
│ │ │ +
435 // add contribution of current factor
│ │ │ +
436 augmentedHessian.updateOffDiagonalBlock(
│ │ │ +
437 aug_i, aug_j,
│ │ │ +
438 -FiT * (Ei_P * E.template block<ZDim, N>(ZDim * j, 0).transpose() *
│ │ │ +
439 Fj));
│ │ │ +
440 }
│ │ │ +
441 } // end of for over cameras
│ │ │
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);
│ │ │ +
443 augmentedHessian.diagonalBlock(M)(0, 0) += b.squaredNorm();
│ │ │ +
444 }
│ │ │ +
│ │ │ +
445
│ │ │ +
446 private:
│ │ │ + │ │ │ +
449 template <class ARCHIVE>
│ │ │ +
450 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ +
451 ar&(*this);
│ │ │ +
452 }
│ │ │ +
453
│ │ │ +
454 public:
│ │ │ + │ │ │ +
456};
│ │ │ +
│ │ │ +
457
│ │ │ +
458template <class CAMERA>
│ │ │ +
459const int CameraSet<CAMERA>::D;
│ │ │
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.
│ │ │ +
461template <class CAMERA>
│ │ │ + │ │ │ +
463
│ │ │ +
464template <class CAMERA>
│ │ │ +
465struct traits<CameraSet<CAMERA>> : public Testable<CameraSet<CAMERA>> {};
│ │ │ +
466
│ │ │ +
467template <class CAMERA>
│ │ │ +
468struct traits<const CameraSet<CAMERA>> : public Testable<CameraSet<CAMERA>> {};
│ │ │ +
469
│ │ │ +
470} // namespace gtsam
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Access to matrices via blocks of pre-defined sizes.
│ │ │ +
A thin wrapper around std::map that uses boost's fast_pool_allocator.
│ │ │ +
Calibrated camera for which only pose is unknown.
│ │ │ +
3D Point
│ │ │ + │ │ │
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
│ │ │ +
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │ +
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
│ │ │
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
│ │ │ +
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │ +
Give fixed size dimension of a type, fails at compile time if dynamic.
Definition Manifold.h:164
│ │ │ +
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
Definition SymmetricBlockMatrix.h:52
│ │ │ +
void setDiagonalBlock(DenseIndex I, const XprType &xpr)
Set a diagonal block. Only the upper triangular portion of xpr is evaluated.
Definition SymmetricBlockMatrix.h:195
│ │ │ +
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
│ │ │ +
constBlock aboveDiagonalBlock(DenseIndex I, DenseIndex J) const
Get block above the diagonal (I, J).
Definition SymmetricBlockMatrix.h:150
│ │ │ +
DenseIndex rows() const
Row size.
Definition SymmetricBlockMatrix.h:114
│ │ │ +
void updateOffDiagonalBlock(DenseIndex I, DenseIndex J, const XprType &xpr)
Update an off diagonal block.
Definition SymmetricBlockMatrix.h:228
│ │ │ +
Eigen::SelfAdjointView< Block, Eigen::Upper > diagonalBlock(DenseIndex J)
Return the J'th diagonal block as a self adjoint view.
Definition SymmetricBlockMatrix.h:135
│ │ │ +
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
│ │ │ +
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
│ │ │ +
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
│ │ │ -
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...
│ │ │ - │ │ │ +
Vector reprojectionError(const POINT &point, const ZVector &measured, boost::optional< FBlocks & > Fs=boost::none, boost::optional< Matrix & > E=boost::none) const
Calculate vector [project2(point)-z] of re-projection errors.
Definition CameraSet.h:136
│ │ │ +
virtual void print(const std::string &s="") const
print
Definition CameraSet.h:85
│ │ │ +
static void ComputePointCovariance(Eigen::Matrix< double, N, N > &P, const Matrix &E, double lambda, bool diagonalDamping=false)
Computes Point Covariance P, with lambda parameter.
Definition CameraSet.h:315
│ │ │ +
static SymmetricBlockMatrix SchurComplement(const FBlocks &Fblocks, const Matrix &E, const Vector &b, const double lambda=0.0, bool diagonalDamping=false)
Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix Dynamic version.
Definition CameraSet.h:348
│ │ │ +
CAMERA::Measurement Z
2D measurement and noise model for each of the m views The order is kept the same as the keys that we...
Definition CameraSet.h:44
│ │ │ +
virtual ~CameraSet()=default
Destructor.
│ │ │ +
bool equals(const CameraSet &p, double tol=1e-9) const
equals
Definition CameraSet.h:91
│ │ │ +
static Matrix PointCov(const Matrix &E, const double lambda=0.0, bool diagonalDamping=false)
Computes Point Covariance P, with lambda parameter, dynamic version.
Definition CameraSet.h:331
│ │ │ +
static Vector ErrorVector(const ZVector &predicted, const ZVector &measured)
Make a vector of re-projection errors.
Definition CameraSet.h:51
│ │ │ +
static void UpdateSchurComplement(const FBlocks &Fs, const Matrix &E, const Eigen::Matrix< double, N, N > &P, const Vector &b, const KeyVector &allKeys, const KeyVector &keys, SymmetricBlockMatrix &augmentedHessian)
Applies Schur complement (exploiting block structure) to get a smart factor on cameras,...
Definition CameraSet.h:369
│ │ │ +
static SymmetricBlockMatrix SchurComplementAndRearrangeBlocks(const std::vector< Eigen::Matrix< double, ZDim, ND >, Eigen::aligned_allocator< Eigen::Matrix< double, ZDim, ND > > > &Fs, const Matrix &E, const Eigen::Matrix< double, N, N > &P, const Vector &b, const KeyVector &jacobianKeys, const KeyVector &hessianKeys)
Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = F' * F - F' * E * P * ...
Definition CameraSet.h:218
│ │ │ +
static SymmetricBlockMatrix SchurComplement(const std::vector< Eigen::Matrix< double, ZDim, ND >, Eigen::aligned_allocator< Eigen::Matrix< double, ZDim, ND > > > &Fs, const Matrix &E, const Eigen::Matrix< double, N, N > &P, const Vector &b)
Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = F' * F - F' * E * P * ...
Definition CameraSet.h:150
│ │ │ +
static const int ZDim
Measurement dimension.
Definition CameraSet.h:48
│ │ │ +
static SymmetricBlockMatrix SchurComplement(const FBlocks &Fs, const Matrix &E, const Eigen::Matrix< double, N, N > &P, const Vector &b)
Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = F' * F - F' * E * P * ...
Definition CameraSet.h:307
│ │ │ +
static const int D
Camera dimension.
Definition CameraSet.h:47
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition CameraSet.h:448
│ │ │ +
Eigen::Matrix< double, ZDim, D > MatrixZD
Definitions for blocks of F.
Definition CameraSet.h:77
│ │ │ +
ZVector project2(const POINT &point, boost::optional< FBlocks & > Fs=boost::none, boost::optional< Matrix & > E=boost::none) const
Project a point (possibly Unit3 at infinity), with derivatives Note that F is a sparse block-diagonal...
Definition CameraSet.h:108
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,815 +1,606 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -triangulation.h │ │ │ │ +CameraSet.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 │ │ │ │ -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 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) │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._h> │ │ │ │ +22#include <_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> │ │ │ │ +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_/_g_e_o_m_e_t_r_y_/_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_._h> // for Cheirality exception │ │ │ │ +25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_3_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +27 │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +35template │ │ │ │ +_3_6class _C_a_m_e_r_a_S_e_t : public std::vector> { │ │ │ │ +37 protected: │ │ │ │ +38 using Base = std::vector>; │ │ │ │ +39 │ │ │ │ +_4_4 typedef typename CAMERA::Measurement _Z; │ │ │ │ +45 typedef typename CAMERA::MeasurementVector ZVector; │ │ │ │ +46 │ │ │ │ +_4_7 static const int _D = _t_r_a_i_t_s_<_C_A_M_E_R_A_>_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +_4_8 static const int _Z_D_i_m = _t_r_a_i_t_s_<_Z_>_:_:_d_i_m_e_n_s_i_o_n; │ │ │ │ +49 │ │ │ │ +_5_1 static Vector _E_r_r_o_r_V_e_c_t_o_r(const ZVector& predicted, const ZVector& measured) │ │ │ │ { │ │ │ │ -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]); │ │ │ │ +52 // Check size │ │ │ │ +53 size_t m = predicted.size(); │ │ │ │ +54 if (measured.size() != m) │ │ │ │ +55 throw std::runtime_error("CameraSet::errors: size mismatch"); │ │ │ │ +56 │ │ │ │ +57 // Project and fill error vector │ │ │ │ +58 Vector b(_Z_D_i_m * m); │ │ │ │ +59 for (size_t i = 0, _r_o_w = 0; i < m; i++, _r_o_w += _Z_D_i_m) { │ │ │ │ +60 Vector bi = _t_r_a_i_t_s_<_Z_>_:_:_L_o_c_a_l(measured[i], predicted[i]); │ │ │ │ +61 if (_Z_D_i_m == 3 && std::isnan(bi(1))) { // if it is a stereo point and the │ │ │ │ +62 // right pixel is missing (nan) │ │ │ │ +63 bi(1) = 0; │ │ │ │ +64 } │ │ │ │ +65 b.segment<_Z_D_i_m>(_r_o_w) = bi; │ │ │ │ +66 } │ │ │ │ +67 return b; │ │ │ │ +68 } │ │ │ │ +69 │ │ │ │ +70 public: │ │ │ │ +71 using Base::Base; // Inherit the vector constructors │ │ │ │ +72 │ │ │ │ +_7_4 virtual _~_C_a_m_e_r_a_S_e_t() = default; │ │ │ │ +75 │ │ │ │ +_7_7 using _M_a_t_r_i_x_Z_D = Eigen::Matrix; │ │ │ │ +78 using FBlocks = std::vector>; │ │ │ │ +79 │ │ │ │ +_8_5 virtual void _p_r_i_n_t(const std::string& s = "") const { │ │ │ │ +86 std::cout << s << "CameraSet, cameras = \n"; │ │ │ │ +87 for (size_t k = 0; k < this->size(); ++k) this->at(k).print(s); │ │ │ │ +88 } │ │ │ │ +89 │ │ │ │ +_9_1 bool _e_q_u_a_l_s(const _C_a_m_e_r_a_S_e_t& p, double tol = 1e-9) const { │ │ │ │ +92 if (this->size() != p.size()) return false; │ │ │ │ +93 bool camerasAreEqual = true; │ │ │ │ +94 for (size_t i = 0; i < this->size(); i++) { │ │ │ │ +95 if (this->at(i).equals(p.at(i), tol) == false) camerasAreEqual = false; │ │ │ │ +96 break; │ │ │ │ +97 } │ │ │ │ +98 return camerasAreEqual; │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +107 template │ │ │ │ +_1_0_8 ZVector _p_r_o_j_e_c_t_2(const POINT& point, // │ │ │ │ +109 boost::optional Fs = boost::none, // │ │ │ │ +110 boost::optional E = boost::none) const { │ │ │ │ +111 static const int N = _F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_P_O_I_N_T_>_:_:_v_a_l_u_e; │ │ │ │ +112 │ │ │ │ +113 // Allocate result │ │ │ │ +114 size_t m = this->size(); │ │ │ │ +115 ZVector z; │ │ │ │ +116 z.reserve(m); │ │ │ │ +117 │ │ │ │ +118 // Allocate derivatives │ │ │ │ +119 if (E) E->resize(_Z_D_i_m * m, N); │ │ │ │ +120 if (Fs) Fs->resize(m); │ │ │ │ +121 │ │ │ │ +122 // Project and fill derivatives │ │ │ │ +123 for (size_t i = 0; i < m; i++) { │ │ │ │ +124 _M_a_t_r_i_x_Z_D Fi; │ │ │ │ +125 Eigen::Matrix Ei; │ │ │ │ +126 z.emplace_back(this->at(i)._p_r_o_j_e_c_t_2(point, Fs ? &Fi : 0, E ? &Ei : 0)); │ │ │ │ +127 if (Fs) (*Fs)[i] = Fi; │ │ │ │ +128 if (E) E->block<_Z_D_i_m, N>(_Z_D_i_m * i, 0) = Ei; │ │ │ │ +129 } │ │ │ │ +130 │ │ │ │ +131 return z; │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +135 template │ │ │ │ +_1_3_6 Vector _r_e_p_r_o_j_e_c_t_i_o_n_E_r_r_o_r(const POINT& point, const ZVector& measured, │ │ │ │ +137 boost::optional Fs = boost::none, // │ │ │ │ +138 boost::optional E = boost::none) const { │ │ │ │ +139 return _E_r_r_o_r_V_e_c_t_o_r(_p_r_o_j_e_c_t_2(point, Fs, E), measured); │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +148 template // N = 2 or 3 (point dimension), ND is the camera dimension │ │ │ │ +_1_5_0 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _S_c_h_u_r_C_o_m_p_l_e_m_e_n_t( │ │ │ │ +151 const std::vector< │ │ │ │ +152 Eigen::Matrix, │ │ │ │ +153 Eigen::aligned_allocator>>& Fs, │ │ │ │ +154 const Matrix& E, const Eigen::Matrix& P, const Vector& b) { │ │ │ │ +155 // a single point is observed in m cameras │ │ │ │ +156 size_t m = Fs.size(); │ │ │ │ +157 │ │ │ │ +158 // Create a SymmetricBlockMatrix (augmented hessian, with extra row/column │ │ │ │ +159 // with info vector) │ │ │ │ +160 size_t M1 = ND * m + 1; │ │ │ │ +161 std::vector dims(m + 1); // this also includes the b term │ │ │ │ +162 std::fill(dims.begin(), dims.end() - 1, ND); │ │ │ │ +163 dims.back() = 1; │ │ │ │ +164 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x augmentedHessian(dims, Matrix::Zero(M1, M1)); │ │ │ │ +165 │ │ │ │ +166 // Blockwise Schur complement │ │ │ │ +167 for (size_t i = 0; i < m; i++) { // for each camera │ │ │ │ +168 │ │ │ │ +169 const Eigen::Matrix& Fi = Fs[i]; │ │ │ │ +170 const auto FiT = Fi.transpose(); │ │ │ │ +171 const Eigen::Matrix Ei_P = // │ │ │ │ +172 E.block(_Z_D_i_m * i, 0, _Z_D_i_m, N) * P; │ │ │ │ +173 │ │ │ │ +174 // D = (Dx2) * ZDim │ │ │ │ +175 augmentedHessian._s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +176 i, m, │ │ │ │ +177 FiT * b.segment<_Z_D_i_m>(_Z_D_i_m * i) // F' * b │ │ │ │ +178 - │ │ │ │ +179 FiT * │ │ │ │ +180 (Ei_P * │ │ │ │ +181 (E.transpose() * │ │ │ │ +182 b))); // D = (DxZDim) * (ZDimx3) * (N*ZDimm) * (ZDimm x 1) │ │ │ │ +183 │ │ │ │ +184 // (DxD) = (DxZDim) * ( (ZDimxD) - (ZDimx3) * (3xZDim) * (ZDimxD) ) │ │ │ │ +185 augmentedHessian._s_e_t_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +186 i, │ │ │ │ +187 FiT * (Fi - Ei_P * E.block(_Z_D_i_m * i, 0, _Z_D_i_m, N).transpose() * Fi)); │ │ │ │ +188 │ │ │ │ +189 // upper triangular part of the hessian │ │ │ │ +190 for (size_t j = i + 1; j < m; j++) { // for each camera │ │ │ │ +191 const Eigen::Matrix& Fj = Fs[j]; │ │ │ │ +192 │ │ │ │ +193 // (DxD) = (Dx2) * ( (2x2) * (2xD) ) │ │ │ │ +194 augmentedHessian._s_e_t_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +195 i, j, │ │ │ │ +196 -FiT * (Ei_P * E.block(_Z_D_i_m * j, 0, _Z_D_i_m, N).transpose() * Fj)); │ │ │ │ +197 } │ │ │ │ +198 } // end of for over cameras │ │ │ │ +199 │ │ │ │ +200 augmentedHessian._d_i_a_g_o_n_a_l_B_l_o_c_k(m)(0, 0) += b.squaredNorm(); │ │ │ │ +201 return augmentedHessian; │ │ │ │ +202 } │ │ │ │ +203 │ │ │ │ +217 template │ │ │ │ +_2_1_8 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _S_c_h_u_r_C_o_m_p_l_e_m_e_n_t_A_n_d_R_e_a_r_r_a_n_g_e_B_l_o_c_k_s( │ │ │ │ +219 const std::vector< │ │ │ │ +220 Eigen::Matrix, │ │ │ │ +221 Eigen::aligned_allocator>>& Fs, │ │ │ │ +222 const Matrix& E, const Eigen::Matrix& P, const Vector& b, │ │ │ │ +223 const _K_e_y_V_e_c_t_o_r& jacobianKeys, const _K_e_y_V_e_c_t_o_r& hessianKeys) { │ │ │ │ +224 size_t nrNonuniqueKeys = jacobianKeys.size(); │ │ │ │ +225 size_t nrUniqueKeys = hessianKeys.size(); │ │ │ │ +226 │ │ │ │ +227 // Marginalize point: note - we reuse the standard SchurComplement │ │ │ │ +function. │ │ │ │ +228 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x augmentedHessian = SchurComplement(Fs, E, P, │ │ │ │ +b); │ │ │ │ +229 │ │ │ │ +230 // Pack into an Hessian factor, allow space for b term. │ │ │ │ +231 std::vector dims(nrUniqueKeys + 1); │ │ │ │ +232 std::fill(dims.begin(), dims.end() - 1, NDD); │ │ │ │ +233 dims.back() = 1; │ │ │ │ +234 _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x augmentedHessianUniqueKeys; │ │ │ │ +235 │ │ │ │ +236 // Deal with the fact that some blocks may share the same keys. │ │ │ │ +237 if (nrUniqueKeys == nrNonuniqueKeys) { │ │ │ │ +238 // Case when there is 1 calibration key per camera: │ │ │ │ +239 augmentedHessianUniqueKeys = _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x( │ │ │ │ +240 dims, Matrix(augmentedHessian._s_e_l_f_a_d_j_o_i_n_t_V_i_e_w())); │ │ │ │ +241 } else { │ │ │ │ +242 // When multiple cameras share a calibration we have to rearrange │ │ │ │ +243 // the results of the Schur complement matrix. │ │ │ │ +244 std::vector nonuniqueDims(nrNonuniqueKeys + 1); // includes b │ │ │ │ +245 std::fill(nonuniqueDims.begin(), nonuniqueDims.end() - 1, NDD); │ │ │ │ +246 nonuniqueDims.back() = 1; │ │ │ │ +247 augmentedHessian = _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x( │ │ │ │ +248 nonuniqueDims, Matrix(augmentedHessian._s_e_l_f_a_d_j_o_i_n_t_V_i_e_w())); │ │ │ │ +249 │ │ │ │ +250 // Get map from key to location in the new augmented Hessian matrix (the │ │ │ │ +251 // one including only unique keys). │ │ │ │ +252 std::map keyToSlotMap; │ │ │ │ +253 for (size_t k = 0; k < nrUniqueKeys; k++) { │ │ │ │ +254 keyToSlotMap[hessianKeys[k]] = k; │ │ │ │ +255 } │ │ │ │ +256 │ │ │ │ +257 // Initialize matrix to zero. │ │ │ │ +258 augmentedHessianUniqueKeys = _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x( │ │ │ │ +259 dims, Matrix::Zero(NDD * nrUniqueKeys + 1, NDD * nrUniqueKeys + 1)); │ │ │ │ +260 │ │ │ │ +261 // Add contributions for each key: note this loops over the hessian with │ │ │ │ +262 // nonUnique keys (augmentedHessian) and populates an Hessian that only │ │ │ │ +263 // includes the unique keys (that is what we want to return). │ │ │ │ +264 for (size_t i = 0; i < nrNonuniqueKeys; i++) { // rows │ │ │ │ +265 _K_e_y key_i = jacobianKeys.at(i); │ │ │ │ +266 │ │ │ │ +267 // Update information vector. │ │ │ │ +268 augmentedHessianUniqueKeys._u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +269 keyToSlotMap[key_i], nrUniqueKeys, │ │ │ │ +270 augmentedHessian._a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(i, nrNonuniqueKeys)); │ │ │ │ +271 │ │ │ │ +272 // Update blocks. │ │ │ │ +273 for (size_t j = i; j < nrNonuniqueKeys; j++) { // cols │ │ │ │ +274 _K_e_y key_j = jacobianKeys.at(j); │ │ │ │ +275 if (i == j) { │ │ │ │ +276 augmentedHessianUniqueKeys._u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +277 keyToSlotMap[key_i], augmentedHessian._d_i_a_g_o_n_a_l_B_l_o_c_k(i)); │ │ │ │ +278 } else { // (i < j) │ │ │ │ +279 if (keyToSlotMap[key_i] != keyToSlotMap[key_j]) { │ │ │ │ +280 augmentedHessianUniqueKeys._u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +281 keyToSlotMap[key_i], keyToSlotMap[key_j], │ │ │ │ +282 augmentedHessian._a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(i, j)); │ │ │ │ +283 } else { │ │ │ │ +284 augmentedHessianUniqueKeys._u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +285 keyToSlotMap[key_i], │ │ │ │ +286 augmentedHessian._a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(i, j) + │ │ │ │ +287 augmentedHessian._a_b_o_v_e_D_i_a_g_o_n_a_l_B_l_o_c_k(i, j).transpose()); │ │ │ │ +288 } │ │ │ │ +289 } │ │ │ │ +290 } │ │ │ │ +291 } │ │ │ │ +292 │ │ │ │ +293 // Update bottom right element of the matrix. │ │ │ │ +294 augmentedHessianUniqueKeys._u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +295 nrUniqueKeys, augmentedHessian._d_i_a_g_o_n_a_l_B_l_o_c_k(nrNonuniqueKeys)); │ │ │ │ +296 } │ │ │ │ +297 return augmentedHessianUniqueKeys; │ │ │ │ +298 } │ │ │ │ +299 │ │ │ │ +306 template // N = 2 or 3 │ │ │ │ +_3_0_7 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _S_c_h_u_r_C_o_m_p_l_e_m_e_n_t( │ │ │ │ +308 const FBlocks& Fs, const Matrix& E, const Eigen::Matrix& P, │ │ │ │ +309 const Vector& b) { │ │ │ │ +310 return SchurComplement(Fs, E, P, b); │ │ │ │ +311 } │ │ │ │ +312 │ │ │ │ +314 template // N = 2 or 3 (point dimension) │ │ │ │ +_3_1_5 static void _C_o_m_p_u_t_e_P_o_i_n_t_C_o_v_a_r_i_a_n_c_e(Eigen::Matrix& P, │ │ │ │ +316 const Matrix& E, double lambda, │ │ │ │ +317 bool diagonalDamping = false) { │ │ │ │ +318 Matrix EtE = E.transpose() * E; │ │ │ │ +319 │ │ │ │ +320 if (diagonalDamping) { // diagonal of the hessian │ │ │ │ +321 EtE.diagonal() += lambda * EtE.diagonal(); │ │ │ │ +322 } else { │ │ │ │ +323 _D_e_n_s_e_I_n_d_e_x n = E.cols(); │ │ │ │ +324 EtE += lambda * Eigen::MatrixXd::Identity(n, n); │ │ │ │ +325 } │ │ │ │ +326 │ │ │ │ +327 P = (EtE).inverse(); │ │ │ │ 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()); │ │ │ │ +329 │ │ │ │ +_3_3_1 static Matrix _P_o_i_n_t_C_o_v(const Matrix& E, const double lambda = 0.0, │ │ │ │ +332 bool diagonalDamping = false) { │ │ │ │ +333 if (E.cols() == 2) { │ │ │ │ +334 Matrix2 P2; │ │ │ │ +335 ComputePointCovariance<2>(P2, E, lambda, diagonalDamping); │ │ │ │ +336 return P2; │ │ │ │ +337 } else { │ │ │ │ +338 Matrix3 P3; │ │ │ │ +339 ComputePointCovariance<3>(P3, E, lambda, diagonalDamping); │ │ │ │ +340 return P3; │ │ │ │ +341 } │ │ │ │ +342 } │ │ │ │ +343 │ │ │ │ +_3_4_8 static _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x _S_c_h_u_r_C_o_m_p_l_e_m_e_n_t(const FBlocks& Fblocks, │ │ │ │ +349 const Matrix& E, const Vector& b, │ │ │ │ +350 const double lambda = 0.0, │ │ │ │ +351 bool diagonalDamping = false) { │ │ │ │ +352 if (E.cols() == 2) { │ │ │ │ +353 Matrix2 P; │ │ │ │ +354 ComputePointCovariance<2>(P, E, lambda, diagonalDamping); │ │ │ │ +355 return SchurComplement<2>(Fblocks, E, P, b); │ │ │ │ +356 } else { │ │ │ │ +357 Matrix3 P; │ │ │ │ +358 ComputePointCovariance<3>(P, E, lambda, diagonalDamping); │ │ │ │ +359 return SchurComplement<3>(Fblocks, E, P, b); │ │ │ │ +360 } │ │ │ │ +361 } │ │ │ │ +362 │ │ │ │ +368 template // N = 2 or 3 (point dimension) │ │ │ │ +_3_6_9 static void _U_p_d_a_t_e_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t( │ │ │ │ +370 const FBlocks& Fs, const Matrix& E, const Eigen::Matrix& P, │ │ │ │ +371 const Vector& b, const _K_e_y_V_e_c_t_o_r& allKeys, const _K_e_y_V_e_c_t_o_r& keys, │ │ │ │ +372 /*output ->*/ _S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x& augmentedHessian) { │ │ │ │ +373 assert(keys.size() == Fs.size()); │ │ │ │ +374 assert(keys.size() <= allKeys.size()); │ │ │ │ +375 │ │ │ │ +376 _F_a_s_t_M_a_p_<_K_e_y_,_ _s_i_z_e___t_> KeySlotMap; │ │ │ │ +377 for (size_t slot = 0; slot < allKeys.size(); slot++) │ │ │ │ +378 KeySlotMap.insert(std::make_pair(allKeys[slot], slot)); │ │ │ │ +379 │ │ │ │ +380 // Schur complement trick │ │ │ │ +381 // G = F' * F - F' * E * P * E' * F │ │ │ │ +382 // g = F' * (b - E * P * E' * b) │ │ │ │ +383 │ │ │ │ +384 // a single point is observed in m cameras │ │ │ │ +385 size_t m = Fs.size(); // cameras observing current point │ │ │ │ +386 size_t M = (augmentedHessian._r_o_w_s() - 1) / _D; // all cameras in the group │ │ │ │ +387 assert(allKeys.size() == M); │ │ │ │ +388 │ │ │ │ +389 // Blockwise Schur complement │ │ │ │ +390 for (size_t i = 0; i < m; i++) { // for each camera in the current factor │ │ │ │ +391 │ │ │ │ +392 const _M_a_t_r_i_x_Z_D& Fi = Fs[i]; │ │ │ │ +393 const auto FiT = Fi.transpose(); │ │ │ │ +394 const Eigen::Matrix Ei_P = │ │ │ │ +395 E.template block(_Z_D_i_m * i, 0) * P; │ │ │ │ +396 │ │ │ │ +397 // D = (DxZDim) * (ZDim) │ │ │ │ +398 // allKeys are the list of all camera keys in the group, e.g, (1,3,4,5,7) │ │ │ │ +399 // we should map those to a slot in the local (grouped) hessian │ │ │ │ +400 // (0,1,2,3,4) Key cameraKey_i = this->keys_[i]; │ │ │ │ +401 _D_e_n_s_e_I_n_d_e_x aug_i = KeySlotMap.at(keys[i]); │ │ │ │ +402 │ │ │ │ +403 // information vector - store previous vector │ │ │ │ +404 // vectorBlock = augmentedHessian(aug_i, aug_m).knownOffDiagonal(); │ │ │ │ +405 // add contribution of current factor │ │ │ │ +406 augmentedHessian._u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +407 aug_i, M, │ │ │ │ +408 FiT * b.segment<_Z_D_i_m>(_Z_D_i_m * i) // F' * b │ │ │ │ +409 - │ │ │ │ +410 FiT * │ │ │ │ +411 (Ei_P * │ │ │ │ +412 (E.transpose() * │ │ │ │ +413 b))); // D = (DxZDim) * (ZDimx3) * (N*ZDimm) * (ZDimm x 1) │ │ │ │ +414 │ │ │ │ +415 // (DxD) += (DxZDim) * ( (ZDimxD) - (ZDimx3) * (3xZDim) * (ZDimxD) ) │ │ │ │ +416 // add contribution of current factor │ │ │ │ +417 // TODO(gareth): Eigen doesn't let us pass the expression. Call eval() for │ │ │ │ +418 // now... │ │ │ │ +419 augmentedHessian._u_p_d_a_t_e_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +420 aug_i, │ │ │ │ +421 ((FiT * │ │ │ │ +422 (Fi - │ │ │ │ +423 Ei_P * E.template block(_Z_D_i_m * i, 0).transpose() * Fi))) │ │ │ │ +424 .eval()); │ │ │ │ +425 │ │ │ │ +426 // upper triangular part of the hessian │ │ │ │ +427 for (size_t j = i + 1; j < m; j++) { // for each camera │ │ │ │ +428 const _M_a_t_r_i_x_Z_D& Fj = Fs[j]; │ │ │ │ 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); │ │ │ │ +430 _D_e_n_s_e_I_n_d_e_x aug_j = KeySlotMap.at(keys[j]); │ │ │ │ +431 │ │ │ │ +432 // (DxD) = (DxZDim) * ( (ZDimxZDim) * (ZDimxD) ) │ │ │ │ +433 // off diagonal block - store previous block │ │ │ │ +434 // matrixBlock = augmentedHessian(aug_i, aug_j).knownOffDiagonal(); │ │ │ │ +435 // add contribution of current factor │ │ │ │ +436 augmentedHessian._u_p_d_a_t_e_O_f_f_D_i_a_g_o_n_a_l_B_l_o_c_k( │ │ │ │ +437 aug_i, aug_j, │ │ │ │ +438 -FiT * (Ei_P * E.template block(_Z_D_i_m * j, 0).transpose() * │ │ │ │ +439 Fj)); │ │ │ │ +440 } │ │ │ │ +441 } // end of for over cameras │ │ │ │ 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); │ │ │ │ +443 augmentedHessian._d_i_a_g_o_n_a_l_B_l_o_c_k(M)(0, 0) += b.squaredNorm(); │ │ │ │ +444 } │ │ │ │ +445 │ │ │ │ +446 private: │ │ │ │ +_4_4_8 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&(*this); │ │ │ │ +452 } │ │ │ │ +453 │ │ │ │ +454 public: │ │ │ │ +455 _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 │ │ │ │ +456}; │ │ │ │ +457 │ │ │ │ +458template │ │ │ │ +459const int _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>_:_:_D; │ │ │ │ 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. │ │ │ │ -_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. │ │ │ │ +461template │ │ │ │ +462const int _C_a_m_e_r_a_S_e_t_<_C_A_M_E_R_A_>_:_:_Z_D_i_m; │ │ │ │ +463 │ │ │ │ +464template │ │ │ │ +_4_6_5struct _t_r_a_i_t_s<_C_a_m_e_r_a_S_e_t> : public _T_e_s_t_a_b_l_e> {}; │ │ │ │ +466 │ │ │ │ +467template │ │ │ │ +_4_6_8struct _t_r_a_i_t_s> : public _T_e_s_t_a_b_l_e> │ │ │ │ +{}; │ │ │ │ +469 │ │ │ │ +470} // namespace gtsam │ │ │ │ +_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 │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_S_y_m_m_e_t_r_i_c_B_l_o_c_k_M_a_t_r_i_x_._h │ │ │ │ +Access to matrices via blocks of pre-defined sizes. │ │ │ │ +_F_a_s_t_M_a_p_._h │ │ │ │ +A thin wrapper around std::map that uses boost's fast_pool_allocator. │ │ │ │ +_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_._h │ │ │ │ +Calibrated camera for which only pose is unknown. │ │ │ │ +_P_o_i_n_t_3_._h │ │ │ │ +3D Point │ │ │ │ +_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_:_:_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_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_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 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_r_e_p_r_o_j_e_c_t_i_o_n_E_r_r_o_r │ │ │ │ +Vector reprojectionError(const POINT &point, const ZVector &measured, boost:: │ │ │ │ +optional< FBlocks & > Fs=boost::none, boost::optional< Matrix & > E=boost:: │ │ │ │ +none) const │ │ │ │ +Calculate vector [project2(point)-z] of re-projection errors. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:136 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_p_r_i_n_t │ │ │ │ +virtual void print(const std::string &s="") const │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:85 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_C_o_m_p_u_t_e_P_o_i_n_t_C_o_v_a_r_i_a_n_c_e │ │ │ │ +static void ComputePointCovariance(Eigen::Matrix< double, N, N > &P, const │ │ │ │ +Matrix &E, double lambda, bool diagonalDamping=false) │ │ │ │ +Computes Point Covariance P, with lambda parameter. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:315 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t │ │ │ │ +static SymmetricBlockMatrix SchurComplement(const FBlocks &Fblocks, const │ │ │ │ +Matrix &E, const Vector &b, const double lambda=0.0, bool │ │ │ │ +diagonalDamping=false) │ │ │ │ +Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix │ │ │ │ +Dynamic version. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:348 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_Z │ │ │ │ +CAMERA::Measurement Z │ │ │ │ +2D measurement and noise model for each of the m views The order is kept the │ │ │ │ +same as the keys that we... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:44 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_~_C_a_m_e_r_a_S_e_t │ │ │ │ +virtual ~CameraSet()=default │ │ │ │ +Destructor. │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const CameraSet &p, double tol=1e-9) const │ │ │ │ +equals │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:91 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_P_o_i_n_t_C_o_v │ │ │ │ +static Matrix PointCov(const Matrix &E, const double lambda=0.0, bool │ │ │ │ +diagonalDamping=false) │ │ │ │ +Computes Point Covariance P, with lambda parameter, dynamic version. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:331 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_E_r_r_o_r_V_e_c_t_o_r │ │ │ │ +static Vector ErrorVector(const ZVector &predicted, const ZVector &measured) │ │ │ │ +Make a vector of re-projection errors. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:51 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_U_p_d_a_t_e_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t │ │ │ │ +static void UpdateSchurComplement(const FBlocks &Fs, const Matrix &E, const │ │ │ │ +Eigen::Matrix< double, N, N > &P, const Vector &b, const KeyVector &allKeys, │ │ │ │ +const KeyVector &keys, SymmetricBlockMatrix &augmentedHessian) │ │ │ │ +Applies Schur complement (exploiting block structure) to get a smart factor on │ │ │ │ +cameras,... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:369 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t_A_n_d_R_e_a_r_r_a_n_g_e_B_l_o_c_k_s │ │ │ │ +static SymmetricBlockMatrix SchurComplementAndRearrangeBlocks(const std:: │ │ │ │ +vector< Eigen::Matrix< double, ZDim, ND >, Eigen::aligned_allocator< Eigen:: │ │ │ │ +Matrix< double, ZDim, ND > > > &Fs, const Matrix &E, const Eigen::Matrix< │ │ │ │ +double, N, N > &P, const Vector &b, const KeyVector &jacobianKeys, const │ │ │ │ +KeyVector &hessianKeys) │ │ │ │ +Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = │ │ │ │ +F' * F - F' * E * P * ... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:218 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t │ │ │ │ +static SymmetricBlockMatrix SchurComplement(const std::vector< Eigen::Matrix< │ │ │ │ +double, ZDim, ND >, Eigen::aligned_allocator< Eigen::Matrix< double, ZDim, ND > │ │ │ │ +> > &Fs, const Matrix &E, const Eigen::Matrix< double, N, N > &P, const Vector │ │ │ │ +&b) │ │ │ │ +Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = │ │ │ │ +F' * F - F' * E * P * ... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:150 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_Z_D_i_m │ │ │ │ +static const int ZDim │ │ │ │ +Measurement dimension. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:48 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_S_c_h_u_r_C_o_m_p_l_e_m_e_n_t │ │ │ │ +static SymmetricBlockMatrix SchurComplement(const FBlocks &Fs, const Matrix &E, │ │ │ │ +const Eigen::Matrix< double, N, N > &P, const Vector &b) │ │ │ │ +Do Schur complement, given Jacobian as Fs,E,P, return SymmetricBlockMatrix G = │ │ │ │ +F' * F - F' * E * P * ... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:307 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_D │ │ │ │ +static const int D │ │ │ │ +Camera dimension. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:47 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_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 │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:448 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_M_a_t_r_i_x_Z_D │ │ │ │ +Eigen::Matrix< double, ZDim, D > MatrixZD │ │ │ │ +Definitions for blocks of F. │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:77 │ │ │ │ +_g_t_s_a_m_:_:_C_a_m_e_r_a_S_e_t_:_:_p_r_o_j_e_c_t_2 │ │ │ │ +ZVector project2(const POINT &point, boost::optional< FBlocks & > Fs=boost:: │ │ │ │ +none, boost::optional< Matrix & > E=boost::none) const │ │ │ │ +Project a point (possibly Unit3 at infinity), with derivatives Note that F is a │ │ │ │ +sparse block-diagonal... │ │ │ │ +DDeeffiinniittiioonn CameraSet.h:108 │ │ │ │ * _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 │ │ │ │ + * _C_a_m_e_r_a_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/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.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,37 +96,40 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
StereoPoint2.cpp File Reference
│ │ │ +
Cal3_S2.cpp File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

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

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

│ │ │ Namespaces

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

│ │ │ Functions

│ │ │ -ostream & gtsam::operator<< (ostream &os, const StereoPoint2 &p)
 
│ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3_S2 &cal)
 
│ │ │

Detailed Description

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

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

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +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 │ │ │ │ -StereoPoint2.cpp File Reference │ │ │ │ +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 │ │ │ │ -ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_t_e_r_e_o_P_o_i_n_t_2 &p) │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3___S_2 &cal) │ │ │ │   │ │ │ │ ********** 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_._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/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/Similarity2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,49 +96,49 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
StereoCamera.h File Reference
│ │ │ +
Similarity2.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::StereoCheiralityException
class  gtsam::Similarity2
 2D similarity transform More...
 
class  gtsam::StereoCamera
 A stereo camera class, parameterize by left camera pose and stereo calibration. More...
struct  gtsam::Similarity2::ChartAtOrigin
 Chart at the origin. More...
 
struct  gtsam::traits< StereoCamera >
struct  gtsam::traits< Similarity2 >
 
struct  gtsam::traits< const StereoCamera >
struct  gtsam::traits< const Similarity2 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

A Stereo Camera based on two Simple Cameras.

│ │ │ -

A Rectified Stereo Camera.

│ │ │ -
Author
Chris Beall
│ │ │ +

Implementation of Similarity2 transform.

│ │ │ +
Author
John Lambert, Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +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 │ │ │ │ -StereoCamera.h File Reference │ │ │ │ -A Stereo Camera based on two Simple Cameras. _M_o_r_e_._._. │ │ │ │ +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_. │ │ │ │ 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_:_:_S_i_m_i_l_a_r_i_t_y_2 │ │ │ │ +  2D similarity transform _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_._._. │ │ │ │ +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_._._. │ │ │ │   │ │ │ │ -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_<_ _S_i_m_i_l_a_r_i_t_y_2_ _> │ │ │ │   │ │ │ │ -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_ _> │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A Stereo Camera based on two Simple Cameras. │ │ │ │ -A Rectified Stereo Camera. │ │ │ │ +Implementation of Similarity2 transform. │ │ │ │ Author │ │ │ │ - Chris Beall │ │ │ │ + John Lambert, Varun Agrawal │ │ │ │ * _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 │ │ │ │ + * _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/a00293.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,6 @@ │ │ │ │ var a00293 = [ │ │ │ │ - ["gtsam::StereoCheiralityException", "a03336.html", null], │ │ │ │ - ["gtsam::traits< StereoCamera >", "a03344.html", null], │ │ │ │ - ["gtsam::traits< const StereoCamera >", "a03348.html", 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/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/Similarity2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
StereoCamera.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
│ │ │ @@ -114,206 +114,151 @@ │ │ │
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};
│ │ │ -
│ │ │ -
42
│ │ │ -
│ │ │ -
47class GTSAM_EXPORT StereoCamera {
│ │ │ -
48
│ │ │ -
49public:
│ │ │ +
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:
│ │ │
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 }
│ │ │ -
│ │ │ + │ │ │ +
53
│ │ │ +
55 Similarity2(double s);
│ │ │ +
56
│ │ │ +
58 Similarity2(const Rot2& R, const Point2& t, double s);
│ │ │ +
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 StereoCamera(const Pose3& leftCamPose, const Cal3_S2Stereo::shared_ptr K);
│ │ │ +
77 void print(const std::string& s) const;
│ │ │
78
│ │ │ -
│ │ │ -
80 const Cal3_S2Stereo& calibration() const {
│ │ │ -
81 return *K_;
│ │ │ -
82 }
│ │ │ -
│ │ │ -
83
│ │ │ +
79 friend std::ostream& operator<<(std::ostream& os, const Similarity2& p);
│ │ │ +
80
│ │ │ +
84
│ │ │ +
86 static Similarity2 Identity();
│ │ │
87
│ │ │ -
│ │ │ -
89 void print(const std::string& s = "") const {
│ │ │ -
90 leftCamPose_.print(s + ".camera.");
│ │ │ -
91 K_->print(s + ".calibration.");
│ │ │ -
92 }
│ │ │ -
│ │ │ +
89 Similarity2 operator*(const Similarity2& S) const;
│ │ │ +
90
│ │ │ +
92 Similarity2 inverse() const;
│ │ │
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 }
│ │ │ -
│ │ │ +
97
│ │ │ +
99 Point2 transformFrom(const Point2& p) const;
│ │ │ +
100
│ │ │ +
112 Pose2 transformFrom(const Pose2& T) const;
│ │ │
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();
│ │ │ -
136 }
│ │ │ -
│ │ │ -
137
│ │ │ -
139 StereoPoint2 project(const Point3& point) const;
│ │ │ +
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
│ │ │
140
│ │ │ -
145 StereoPoint2 project2(const Point3& point, OptionalJacobian<3, 6> H1 =
│ │ │ -
146 boost::none, OptionalJacobian<3, 3> H2 = boost::none) const;
│ │ │ +
145 static Vector4 Logmap(const Similarity2& S, //
│ │ │ +
146 OptionalJacobian<4, 4> Hm = boost::none);
│ │ │
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;
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
175 return Eigen::Matrix<double,traits<Measurement>::dimension,1>::Constant(2.0 * K_->fx());;
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
179
│ │ │ -
180private:
│ │ │ +
174 Matrix3 matrix() const;
│ │ │ +
175
│ │ │ +
177 Rot2 rotation() const { return R_; }
│ │ │ +
178
│ │ │ +
180 Point2 translation() const { return t_; }
│ │ │
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};
│ │ │ -
│ │ │ +
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
│ │ │ -
191template<>
│ │ │ -
│ │ │ -
192struct traits<StereoCamera> : public internal::Manifold<StereoCamera> {
│ │ │ -
193};
│ │ │ -
│ │ │ -
194
│ │ │ -
195template<>
│ │ │ -
│ │ │ -
196struct traits<const StereoCamera> : public internal::Manifold<StereoCamera> {
│ │ │ -
197};
│ │ │ +
192};
│ │ │
│ │ │ -
198}
│ │ │ -
A 2D stereo point (uL,uR,v)
│ │ │ -
3D Pose
│ │ │ -
The most common 5DOF 3D->2D calibration + Stereo baseline.
│ │ │ +
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 Pose
│ │ │ +
2D rotation
│ │ │ +
2D Point
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -StereoCamera.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 │ │ │ │ @@ -16,250 +16,197 @@ │ │ │ │ 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: │ │ │ │ +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_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: │ │ │ │ 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 } │ │ │ │ +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 _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 _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); │ │ │ │ +77 void _p_r_i_n_t(const std::string& s) const; │ │ │ │ 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 │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +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 │ │ │ │ -_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 } │ │ │ │ +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 │ │ │ │ -_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(); │ │ │ │ -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; │ │ │ │ +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 │ │ │ │ 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; │ │ │ │ +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 _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; │ │ │ │ +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 │ │ │ │ -_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: │ │ │ │ +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 │ │ │ │ -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}; │ │ │ │ +_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 │ │ │ │ -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) │ │ │ │ -_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. │ │ │ │ +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 │ │ │ │ +_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. │ │ │ │ +_P_o_s_e_2_._h │ │ │ │ +2D Pose │ │ │ │ +_R_o_t_2_._h │ │ │ │ +2D rotation │ │ │ │ +_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_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_:_:_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 │ │ │ │ +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_:_:_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_:_:_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_:_:_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 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 │ │ │ │ +_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 │ │ │ │ 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 │ │ │ │ +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 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 │ │ │ │ +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_t_e_r_e_o_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/a00299.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SphericalCamera.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,51 +95,83 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
SphericalCamera.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
Rot3.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Calibrated camera with spherical projection. │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::EmptyCal
 Empty calibration. More...
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...
 
class  gtsam::SphericalCamera
 A spherical camera class that has a Pose3 and measures bearing vectors. More...
struct  gtsam::Rot3::CayleyChart
 
struct  gtsam::traits< SphericalCamera >
struct  gtsam::Rot3::ChartAtOrigin
 
struct  gtsam::traits< const SphericalCamera >
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

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

│ │ │ -

Calibrated camera with spherical projection.

│ │ │ -
Date
Aug 26, 2021
│ │ │ -
Author
Luca Carlone
│ │ │ +

3D rotation represented as a rotation matrix or quaternion

│ │ │ +
Author
Alireza Fathi
│ │ │ +
│ │ │ +Christian Potthast
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │ +
│ │ │ +Luca Carlone
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,56 @@ │ │ │ │ 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 │ │ │ │ -SphericalCamera.h File Reference │ │ │ │ -Calibrated camera with spherical projection. _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_:_:_E_m_p_t_y_C_a_l │ │ │ │ -  Empty calibration. _M_o_r_e_._._. │ │ │ │ + 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_._._. │ │ │ │   │ │ │ │ - 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_:_:_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_<_ _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_ _> │ │ │ │ +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_<_ _c_o_n_s_t_ _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_<_ _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. │ │ │ │   │ │ │ │ +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 ********** │ │ │ │ -Calibrated camera with spherical projection. │ │ │ │ - Date │ │ │ │ - Aug 26, 2021 │ │ │ │ +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 │ │ │ │ - * _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ + * _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/a00299.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,8 @@ │ │ │ │ var a00299 = [ │ │ │ │ - ["gtsam::traits< SphericalCamera >", "a03328.html", null], │ │ │ │ - ["gtsam::traits< const SphericalCamera >", "a03332.html", 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", "a00299.html#a52e26554234edf7de94a5e43dd0bcbf9", null], │ │ │ │ + ["RQ", "a00299.html#a5172b5b6d51bd5348c7e551e1376f60a", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00299_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SphericalCamera.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,245 +98,443 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
SphericalCamera.h
│ │ │ +
Rot3.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>
│ │ │ - │ │ │ -
23#include <gtsam/base/concepts.h>
│ │ │ -
24#include <gtsam/dllexport.h>
│ │ │ - │ │ │ - │ │ │ -
27#include <gtsam/geometry/Unit3.h>
│ │ │ -
28
│ │ │ -
29#include <boost/serialization/nvp.hpp>
│ │ │ -
30
│ │ │ -
31namespace gtsam {
│ │ │ -
32
│ │ │ -
│ │ │ -
40class GTSAM_EXPORT EmptyCal {
│ │ │ -
41 public:
│ │ │ -
42 enum { dimension = 0 };
│ │ │ -
43 EmptyCal() {}
│ │ │ -
44 virtual ~EmptyCal() = default;
│ │ │ -
45 using shared_ptr = boost::shared_ptr<EmptyCal>;
│ │ │ -
46
│ │ │ -
48 inline static size_t Dim() { return dimension; }
│ │ │ +
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
│ │ │ -
50 void print(const std::string& s) const {
│ │ │ -
51 std::cout << "empty calibration: " << s << std::endl;
│ │ │ -
52 }
│ │ │ -
53
│ │ │ -
54 private:
│ │ │ -
56 friend class boost::serialization::access;
│ │ │ -
57 template <class Archive>
│ │ │ -
58 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
59 ar& boost::serialization::make_nvp(
│ │ │ -
60 "EmptyCal", boost::serialization::base_object<EmptyCal>(*this));
│ │ │ -
61 }
│ │ │ -
62};
│ │ │ -
│ │ │ -
63
│ │ │ -
│ │ │ -
70class GTSAM_EXPORT SphericalCamera {
│ │ │ -
71 public:
│ │ │ -
72 enum { dimension = 6 };
│ │ │ -
73
│ │ │ -
74 using Measurement = Unit3;
│ │ │ -
75 using MeasurementVector = std::vector<Unit3>;
│ │ │ - │ │ │ -
77
│ │ │ -
78 private:
│ │ │ -
79 Pose3 pose_;
│ │ │ -
80
│ │ │ -
81 protected:
│ │ │ -
82 EmptyCal::shared_ptr emptyCal_;
│ │ │ -
83
│ │ │ -
84 public:
│ │ │ +
50namespace gtsam {
│ │ │ +
51
│ │ │ +
│ │ │ +
58class GTSAM_EXPORT Rot3 : public LieGroup<Rot3, 3> {
│ │ │ +
59 private:
│ │ │ +
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
│ │ │ -
│ │ │ - │ │ │ -
90 : pose_(Pose3()), emptyCal_(boost::make_shared<EmptyCal>()) {}
│ │ │ -
│ │ │ -
91
│ │ │ -
│ │ │ -
93 explicit SphericalCamera(const Pose3& pose)
│ │ │ -
94 : pose_(pose), emptyCal_(boost::make_shared<EmptyCal>()) {}
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
97 explicit SphericalCamera(const Pose3& pose,
│ │ │ -
98 const EmptyCal::shared_ptr& cal)
│ │ │ -
99 : pose_(pose), emptyCal_(cal) {}
│ │ │ -
│ │ │ -
100
│ │ │ -
104 explicit SphericalCamera(const Vector& v) : pose_(Pose3::Expmap(v)) {}
│ │ │ -
105
│ │ │ -
107 virtual ~SphericalCamera() = default;
│ │ │ -
108
│ │ │ -
│ │ │ -
110 const EmptyCal::shared_ptr& sharedCalibration() const {
│ │ │ -
111 return emptyCal_;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
115 const EmptyCal& calibration() const { return *emptyCal_; }
│ │ │ -
116
│ │ │ -
120
│ │ │ -
122 bool equals(const SphericalCamera& camera, double tol = 1e-9) const;
│ │ │ +
95 template <typename Derived>
│ │ │ +
96#ifdef GTSAM_USE_QUATERNIONS
│ │ │ +
97 explicit Rot3(const Eigen::MatrixBase<Derived>& R) {
│ │ │ +
98 quaternion_ = Matrix3(R);
│ │ │ +
99 }
│ │ │ +
100#else
│ │ │ +
│ │ │ +
101 explicit Rot3(const Eigen::MatrixBase<Derived>& R) : rot_(R) {
│ │ │ +
102 }
│ │ │ +
│ │ │ +
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
│ │ │ -
125 virtual void print(const std::string& s = "SphericalCamera") const;
│ │ │ -
126
│ │ │ +
128 Rot3(const Quaternion& q);
│ │ │ +
129 Rot3(double w, double x, double y, double z) : Rot3(Quaternion(w, x, y, z)) {}
│ │ │
130
│ │ │ -
132 const Pose3& pose() const { return pose_; }
│ │ │ -
133
│ │ │ -
135 const Rot3& rotation() const { return pose_.rotation(); }
│ │ │ -
136
│ │ │ -
138 const Point3& translation() const { return pose_.translation(); }
│ │ │ -
139
│ │ │ -
140 // /// return pose, with derivative
│ │ │ -
141 // const Pose3& getPose(OptionalJacobian<6, 6> H) const;
│ │ │ -
142
│ │ │ +
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 std::pair<Unit3, bool> projectSafe(const Point3& pw) const;
│ │ │ +
148 static Rot3 Ry(double t);
│ │ │
149
│ │ │ -
155 Unit3 project2(const Point3& pw, OptionalJacobian<2, 6> Dpose = boost::none,
│ │ │ -
156 OptionalJacobian<2, 3> Dpoint = boost::none) const;
│ │ │ -
157
│ │ │ -
163 Unit3 project2(const Unit3& pwu, OptionalJacobian<2, 6> Dpose = boost::none,
│ │ │ -
164 OptionalJacobian<2, 2> Dpoint = boost::none) const;
│ │ │ -
165
│ │ │ -
167 Point3 backproject(const Unit3& p, const double depth) const;
│ │ │ -
168
│ │ │ -
170 Unit3 backprojectPointAtInfinity(const Unit3& p) const;
│ │ │ -
171
│ │ │ -
177 Unit3 project(const Point3& point, OptionalJacobian<2, 6> Dpose = boost::none,
│ │ │ -
178 OptionalJacobian<2, 3> Dpoint = boost::none) const;
│ │ │ -
179
│ │ │ -
184 Vector2 reprojectionError(const Point3& point, const Unit3& measured,
│ │ │ -
185 OptionalJacobian<2, 6> Dpose = boost::none,
│ │ │ -
186 OptionalJacobian<2, 3> Dpoint = boost::none) const;
│ │ │ -
188
│ │ │ -
│ │ │ -
190 SphericalCamera retract(const Vector6& d) const {
│ │ │ -
191 return SphericalCamera(pose().retract(d));
│ │ │ -
192 }
│ │ │ -
│ │ │ -
193
│ │ │ -
│ │ │ -
195 Vector6 localCoordinates(const SphericalCamera& p) const {
│ │ │ -
196 return pose().localCoordinates(p.pose());
│ │ │ -
197 }
│ │ │ -
│ │ │ -
198
│ │ │ -
│ │ │ - │ │ │ -
201 return SphericalCamera(
│ │ │ -
202 Pose3::Identity()); // assumes that the default constructor is valid
│ │ │ -
203 }
│ │ │ -
│ │ │ -
204
│ │ │ -
│ │ │ -
206 Matrix34 cameraProjectionMatrix() const {
│ │ │ -
207 return Matrix34(pose_.inverse().matrix().block(0, 0, 3, 4));
│ │ │ -
208 }
│ │ │ -
│ │ │ -
209
│ │ │ -
│ │ │ - │ │ │ -
212 return Eigen::Matrix<double, traits<Point2>::dimension, 1>::Constant(0.0);
│ │ │ -
213 }
│ │ │ -
│ │ │ -
214
│ │ │ -
216 size_t dim() const { return 6; }
│ │ │ -
217
│ │ │ -
219 static size_t Dim() { return 6; }
│ │ │ -
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(pose_);
│ │ │ -
227 }
│ │ │ -
228
│ │ │ -
229 public:
│ │ │ - │ │ │ -
231};
│ │ │ -
│ │ │ -
232// end of class SphericalCamera
│ │ │ -
233
│ │ │ -
234template <>
│ │ │ -
235struct traits<SphericalCamera> : public internal::LieGroup<Pose3> {};
│ │ │ -
236
│ │ │ -
237template <>
│ │ │ -
238struct traits<const SphericalCamera> : public internal::LieGroup<Pose3> {};
│ │ │ -
239
│ │ │ -
240} // namespace gtsam
│ │ │ -
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ -
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ -
3D Pose
│ │ │ -
Bearing-Range product.
│ │ │ +
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);
│ │ │ +
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.
│ │ │
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
│ │ │ -
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
│ │ │ -
Point2_ project(const Point3_ &p_cam)
Expression version of PinholeBase::Project.
Definition expressions.h:131
│ │ │
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
│ │ │ -
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
Definition Pose3.cpp:308
│ │ │ -
Matrix4 matrix() const
convert to 4*4 matrix
Definition Pose3.cpp:323
│ │ │ -
Pose3 inverse() const
inverse transformation with derivatives
Definition Pose3.cpp:49
│ │ │ -
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation
Definition Pose3.cpp:315
│ │ │
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Definition Rot3.h:58
│ │ │ -
Empty calibration.
Definition SphericalCamera.h:40
│ │ │ -
static size_t Dim()
return DOF, dimensionality of tangent space
Definition SphericalCamera.h:48
│ │ │ -
A spherical camera class that has a Pose3 and measures bearing vectors.
Definition SphericalCamera.h:70
│ │ │ -
const EmptyCal::shared_ptr & sharedCalibration() const
return shared pointer to calibration
Definition SphericalCamera.h:110
│ │ │ -
static size_t Dim()
Definition SphericalCamera.h:219
│ │ │ -
SphericalCamera(const Pose3 &pose)
Constructor with pose.
Definition SphericalCamera.h:93
│ │ │ -
virtual ~SphericalCamera()=default
Default destructor.
│ │ │ -
Matrix34 cameraProjectionMatrix() const
for Linear Triangulation
Definition SphericalCamera.h:206
│ │ │ -
Vector6 localCoordinates(const SphericalCamera &p) const
return canonical coordinate
Definition SphericalCamera.h:195
│ │ │ -
const Rot3 & rotation() const
get rotation
Definition SphericalCamera.h:135
│ │ │ -
const Pose3 & pose() const
return pose, constant version
Definition SphericalCamera.h:132
│ │ │ -
const Point3 & translation() const
get translation
Definition SphericalCamera.h:138
│ │ │ -
SphericalCamera retract(const Vector6 &d) const
move a cameras according to d
Definition SphericalCamera.h:190
│ │ │ -
const EmptyCal & calibration() const
return calibration
Definition SphericalCamera.h:115
│ │ │ -
size_t dim() const
Definition SphericalCamera.h:216
│ │ │ -
static SphericalCamera Identity()
for Canonical
Definition SphericalCamera.h:200
│ │ │ -
SphericalCamera()
Default constructor.
Definition SphericalCamera.h:89
│ │ │ -
Vector defaultErrorWhenTriangulatingBehindCamera() const
for Nonlinear Triangulation
Definition SphericalCamera.h:211
│ │ │ -
SphericalCamera(const Pose3 &pose, const EmptyCal::shared_ptr &cal)
Constructor with empty intrinsics (needed for smart factors)
Definition SphericalCamera.h:97
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,323 +1,543 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SphericalCamera.h │ │ │ │ +Rot3.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_e_/_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h> │ │ │ │ -23#include │ │ │ │ -24#include │ │ │ │ -25#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> │ │ │ │ -26#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29#include │ │ │ │ -30 │ │ │ │ -31namespace _g_t_s_a_m { │ │ │ │ -32 │ │ │ │ -_4_0class GTSAM_EXPORT _E_m_p_t_y_C_a_l { │ │ │ │ -41 public: │ │ │ │ -42 enum { dimension = 0 }; │ │ │ │ -43 _E_m_p_t_y_C_a_l() {} │ │ │ │ -44 virtual _~_E_m_p_t_y_C_a_l() = default; │ │ │ │ -45 using shared_ptr = boost::shared_ptr; │ │ │ │ -46 │ │ │ │ -_4_8 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +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 │ │ │ │ -50 void _p_r_i_n_t(const std::string& s) const { │ │ │ │ -51 std::cout << "empty calibration: " << s << std::endl; │ │ │ │ -52 } │ │ │ │ -53 │ │ │ │ -54 private: │ │ │ │ -_5_6 friend class boost::serialization::access; │ │ │ │ -57 template │ │ │ │ -58 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -59 ar& boost::serialization::make_nvp( │ │ │ │ -60 "EmptyCal", boost::serialization::base_object(*this)); │ │ │ │ -61 } │ │ │ │ -62}; │ │ │ │ -63 │ │ │ │ -_7_0class GTSAM_EXPORT _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a { │ │ │ │ -71 public: │ │ │ │ -72 enum { dimension = 6 }; │ │ │ │ -73 │ │ │ │ -74 using _M_e_a_s_u_r_e_m_e_n_t = _U_n_i_t_3; │ │ │ │ -75 using MeasurementVector = std::vector; │ │ │ │ -76 using _C_a_l_i_b_r_a_t_i_o_n_T_y_p_e = _E_m_p_t_y_C_a_l; │ │ │ │ -77 │ │ │ │ -78 private: │ │ │ │ -79 _P_o_s_e_3 pose_; │ │ │ │ -80 │ │ │ │ -81 protected: │ │ │ │ -82 EmptyCal::shared_ptr emptyCal_; │ │ │ │ -83 │ │ │ │ -84 public: │ │ │ │ +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: │ │ │ │ +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 │ │ │ │ -_8_9 _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a() │ │ │ │ -90 : pose_(_P_o_s_e_3()), emptyCal_(boost::_m_a_k_e___s_h_a_r_e_d<_E_m_p_t_y_C_a_l>()) {} │ │ │ │ -91 │ │ │ │ -_9_3 explicit _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a(const _P_o_s_e_3& pose) │ │ │ │ -94 : pose_(pose), emptyCal_(boost::_m_a_k_e___s_h_a_r_e_d<_E_m_p_t_y_C_a_l>()) {} │ │ │ │ -95 │ │ │ │ -_9_7 explicit _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a(const _P_o_s_e_3& pose, │ │ │ │ -98 const EmptyCal::shared_ptr& cal) │ │ │ │ -99 : pose_(pose), emptyCal_(cal) {} │ │ │ │ -100 │ │ │ │ -104 explicit _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a(const Vector& v) : pose_(_P_o_s_e_3::Expmap(v)) {} │ │ │ │ -105 │ │ │ │ -_1_0_7 virtual _~_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a() = default; │ │ │ │ -108 │ │ │ │ -_1_1_0 const EmptyCal::shared_ptr& _s_h_a_r_e_d_C_a_l_i_b_r_a_t_i_o_n() const { │ │ │ │ -111 return emptyCal_; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_1_5 const _E_m_p_t_y_C_a_l& _c_a_l_i_b_r_a_t_i_o_n() const { return *emptyCal_; } │ │ │ │ -116 │ │ │ │ -120 │ │ │ │ -122 bool _e_q_u_a_l_s(const _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a& camera, double tol = 1e-9) const; │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -125 virtual void _p_r_i_n_t(const std::string& s = "SphericalCamera") const; │ │ │ │ -126 │ │ │ │ +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 │ │ │ │ -_1_3_2 const _P_o_s_e_3& _p_o_s_e() const { return pose_; } │ │ │ │ -133 │ │ │ │ -_1_3_5 const _R_o_t_3& _r_o_t_a_t_i_o_n() const { return pose_._r_o_t_a_t_i_o_n(); } │ │ │ │ -136 │ │ │ │ -_1_3_8 const _P_o_i_n_t_3& _t_r_a_n_s_l_a_t_i_o_n() const { return pose_._t_r_a_n_s_l_a_t_i_o_n(); } │ │ │ │ -139 │ │ │ │ -140 // /// return pose, with derivative │ │ │ │ -141 // const Pose3& getPose(OptionalJacobian<6, 6> H) const; │ │ │ │ -142 │ │ │ │ +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 std::pair projectSafe(const _P_o_i_n_t_3& pw) const; │ │ │ │ +148 static _R_o_t_3 Ry(double t); │ │ │ │ 149 │ │ │ │ -155 _U_n_i_t_3 project2(const _P_o_i_n_t_3& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Dpose = boost:: │ │ │ │ -none, │ │ │ │ -156 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none) const; │ │ │ │ -157 │ │ │ │ -163 _U_n_i_t_3 project2(const _U_n_i_t_3& pwu, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Dpose = boost:: │ │ │ │ -none, │ │ │ │ -164 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dpoint = boost::none) const; │ │ │ │ -165 │ │ │ │ -167 _P_o_i_n_t_3 backproject(const _U_n_i_t_3& p, const double depth) const; │ │ │ │ -168 │ │ │ │ -170 _U_n_i_t_3 backprojectPointAtInfinity(const _U_n_i_t_3& p) const; │ │ │ │ -171 │ │ │ │ -177 _U_n_i_t_3 _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_<_2_,_ _6_> Dpose = boost:: │ │ │ │ -none, │ │ │ │ -178 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none) const; │ │ │ │ -179 │ │ │ │ -184 Vector2 reprojectionError(const _P_o_i_n_t_3& point, const _U_n_i_t_3& measured, │ │ │ │ -185 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Dpose = boost::none, │ │ │ │ -186 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none) const; │ │ │ │ -188 │ │ │ │ -_1_9_0 _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a _r_e_t_r_a_c_t(const Vector6& d) const { │ │ │ │ -191 return _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a(pose().retract(d)); │ │ │ │ -192 } │ │ │ │ -193 │ │ │ │ -_1_9_5 Vector6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a& p) const { │ │ │ │ -196 return pose().localCoordinates(p._p_o_s_e()); │ │ │ │ -197 } │ │ │ │ -198 │ │ │ │ -_2_0_0 static _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a _I_d_e_n_t_i_t_y() { │ │ │ │ -201 return _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a( │ │ │ │ -202 Pose3::Identity()); // assumes that the default constructor is valid │ │ │ │ -203 } │ │ │ │ -204 │ │ │ │ -_2_0_6 Matrix34 _c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x() const { │ │ │ │ -207 return Matrix34(pose_._i_n_v_e_r_s_e()._m_a_t_r_i_x().block(0, 0, 3, 4)); │ │ │ │ -208 } │ │ │ │ -209 │ │ │ │ -_2_1_1 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 { │ │ │ │ -212 return Eigen::Matrix::dimension, 1>::Constant(0.0); │ │ │ │ -213 } │ │ │ │ -214 │ │ │ │ -_2_1_6 size_t _d_i_m() const { return 6; } │ │ │ │ -217 │ │ │ │ -_2_1_9 static size_t _D_i_m() { return 6; } │ │ │ │ -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(pose_); │ │ │ │ -227 } │ │ │ │ -228 │ │ │ │ -229 public: │ │ │ │ -230 _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 │ │ │ │ -231}; │ │ │ │ -232// end of class SphericalCamera │ │ │ │ -233 │ │ │ │ -234template <> │ │ │ │ -_2_3_5struct _t_r_a_i_t_s<_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -236 │ │ │ │ -237template <> │ │ │ │ -_2_3_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ -239 │ │ │ │ -240} // namespace gtsam │ │ │ │ +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); │ │ │ │ +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); │ │ │ │ +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 │ │ │ │ This marks a GTSAM object to require alignment. │ │ │ │ DDeeffiinniittiioonn types.h:308 │ │ │ │ -_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ -Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ -_B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ -Bearing-Range product. │ │ │ │ +_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. │ │ │ │ _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_:_:_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_:_:_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_:_:_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_:_:_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_:_:_P_o_s_e_3_:_:_m_a_t_r_i_x │ │ │ │ -Matrix4 matrix() const │ │ │ │ -convert to 4*4 matrix │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:323 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_i_n_v_e_r_s_e │ │ │ │ -Pose3 inverse() const │ │ │ │ -inverse transformation with derivatives │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:49 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_r_o_t_a_t_i_o_n │ │ │ │ -const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const │ │ │ │ -get rotation │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:315 │ │ │ │ _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_:_:_E_m_p_t_y_C_a_l │ │ │ │ -Empty calibration. │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:40 │ │ │ │ -_g_t_s_a_m_:_:_E_m_p_t_y_C_a_l_:_:_D_i_m │ │ │ │ -static size_t Dim() │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:48 │ │ │ │ -_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 Pose3 and measures bearing vectors. │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:70 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_s_h_a_r_e_d_C_a_l_i_b_r_a_t_i_o_n │ │ │ │ -const EmptyCal::shared_ptr & sharedCalibration() const │ │ │ │ -return shared pointer to calibration │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:110 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ -static size_t Dim() │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:219 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a │ │ │ │ -SphericalCamera(const Pose3 &pose) │ │ │ │ -Constructor with pose. │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:93 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_~_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a │ │ │ │ -virtual ~SphericalCamera()=default │ │ │ │ -Default destructor. │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x │ │ │ │ -Matrix34 cameraProjectionMatrix() const │ │ │ │ -for Linear Triangulation │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:206 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_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 SphericalCamera &p) const │ │ │ │ -return canonical coordinate │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:195 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_r_o_t_a_t_i_o_n │ │ │ │ -const Rot3 & rotation() const │ │ │ │ -get rotation │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:135 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_p_o_s_e │ │ │ │ -const Pose3 & pose() const │ │ │ │ -return pose, constant version │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:132 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ -const Point3 & translation() const │ │ │ │ -get translation │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:138 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_r_e_t_r_a_c_t │ │ │ │ -SphericalCamera retract(const Vector6 &d) const │ │ │ │ -move a cameras according to d │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:190 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_c_a_l_i_b_r_a_t_i_o_n │ │ │ │ -const EmptyCal & calibration() const │ │ │ │ -return calibration │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:115 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:216 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static SphericalCamera Identity() │ │ │ │ -for Canonical │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:200 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a │ │ │ │ -SphericalCamera() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:89 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_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 SphericalCamera.h:211 │ │ │ │ -_g_t_s_a_m_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_:_:_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a │ │ │ │ -SphericalCamera(const Pose3 &pose, const EmptyCal::shared_ptr &cal) │ │ │ │ -Constructor with empty intrinsics (needed for smart factors) │ │ │ │ -DDeeffiinniittiioonn SphericalCamera.h:97 │ │ │ │ +_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 │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ + * _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/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/SimpleCamera.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,57 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
SimpleCamera.h File Reference
│ │ │ +Namespaces
│ │ │ +
SimpleCamera.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │

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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -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
│ │ │ +
Date
June 30, 2012
│ │ │
Author
Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,22 @@ │ │ │ │ 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 │ │ │ │ +_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_._._. │ │ │ │ -_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. │ │ │ │ -  │ │ │ │ -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 ********** │ │ │ │ A simple camera class with a Cal3_S2 calibration. │ │ │ │ Date │ │ │ │ - Aug 16, 2009 │ │ │ │ + June 30, 2012 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ * _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_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/a00308.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SimpleCamera.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Quaternion.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
SimpleCamera.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Typedefs
│ │ │ +
Quaternion.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

│ │ │ -

A simple camera class with a Cal3_S2 calibration.

│ │ │ -
Date
June 30, 2012
│ │ │ +

Lie Group wrapper for Eigen Quaternions.

│ │ │
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,30 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_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_._._. │ │ │ │ +_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 ********** │ │ │ │ -A simple camera class with a Cal3_S2 calibration. │ │ │ │ - Date │ │ │ │ - June 30, 2012 │ │ │ │ +Lie Group wrapper for Eigen Quaternions. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ * _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_._c_p_p │ │ │ │ + * _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/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/Point2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,61 +94,63 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
Similarity3.h File Reference
│ │ │ +
Point2.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Implementation of Similarity3 transform. │ │ │ +

2D Point │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::Similarity3
 3D similarity transform More...
 
struct  gtsam::Similarity3::ChartAtOrigin
 Chart at the origin. More...
 
struct  gtsam::traits< Similarity3 >
 
struct  gtsam::traits< const Similarity3 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ Functions

│ │ │ -template<>
Matrix gtsam::wedge< Similarity3 > (const Vector &xi)
 
│ │ │ +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)
 
│ │ │

Detailed Description

│ │ │ -

Implementation of Similarity3 transform.

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

2D Point

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +1,48 @@ │ │ │ │ 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_._._. │ │ │ │ -_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_._._. │ │ │ │ -  │ │ │ │ -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_<_ _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_ _> │ │ │ │ -  │ │ │ │ +_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_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<> │ │ │ │ - Matrix  ggttssaamm::::wweeddggee<< SSiimmiillaarriittyy33 >> (const Vector &xi) │ │ │ │ + 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. │ │ │ │ +  │ │ │ │ + ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam:: │ │ │ │ + Point2Pair &p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of Similarity3 transform. │ │ │ │ +2D Point │ │ │ │ Author │ │ │ │ - Paul Drews │ │ │ │ - John Lambert │ │ │ │ + Frank Dellaert │ │ │ │ * _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 │ │ │ │ + * _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/a00311.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,6 @@ │ │ │ │ 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] │ │ │ │ + ["circleCircleIntersection", "a00311.html#a93d4e38a582b6f32fc4f301df10721d5", null], │ │ │ │ + ["distance2", "a00311.html#afd1282dfb080cb393ae60188b4582cb2", null], │ │ │ │ + ["means", "a00311.html#a9e357cda5287fae1438f86bc4df27a80", null], │ │ │ │ + ["norm2", "a00311.html#afee4e6aa4aba9b6a6b421ddd75b52dfc", null] │ │ │ │ ]; │ │ ├── ./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/Cal3_S2Stereo.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,42 +96,40 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
Similarity3.cpp File Reference
│ │ │ +
Cal3_S2Stereo.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Implementation of Similarity3 transform. │ │ │ +

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

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

│ │ │ Namespaces

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

Implementation of Similarity3 transform.

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

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

│ │ │ +
Author
Chris Beall
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +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 │ │ │ │ -Similarity3.cpp File Reference │ │ │ │ -Implementation of Similarity3 transform. _M_o_r_e_._._. │ │ │ │ +Cal3_S2Stereo.cpp File Reference │ │ │ │ +The most common 5DOF 3D->2D calibration + Stereo baseline. _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 _S_i_m_i_l_a_r_i_t_y_3 &p) │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3___S_2_S_t_e_r_e_o &cal) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Implementation of Similarity3 transform. │ │ │ │ +The most common 5DOF 3D->2D calibration + Stereo baseline. │ │ │ │ Author │ │ │ │ - Paul Drews │ │ │ │ - John Lambert │ │ │ │ + Chris Beall │ │ │ │ * _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 │ │ │ │ + * _C_a_l_3___S_2_S_t_e_r_e_o_._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/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/triangulation.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,73 +98,189 @@ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Typedefs | │ │ │ Functions
│ │ │ -
SOn.h File Reference
│ │ │ +
triangulation.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

Functions for triangulation. │ │ │ 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::TriangulationUnderconstrainedException
 Exception thrown by triangulateDLT when SVD returns rank < 3. More...
 
struct  gtsam::SO< N >::ChartAtOrigin
class  gtsam::TriangulationCheiralityException
 Exception thrown by triangulateDLT when landmark is behind one or more of the cameras. More...
 
struct  gtsam::traits< SO< N > >
struct  gtsam::TriangulationParameters
 
struct  gtsam::traits< const SO< N > >
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::SOn = SO< Eigen::Dynamic >
 
│ │ │ -using gtsam::DynamicJacobian = OptionalJacobian< Eigen::Dynamic, Eigen::Dynamic >
 
│ │ │ +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

│ │ │ -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.
 
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

│ │ │ -

N*N matrix representation of SO(N).

│ │ │ -

N can be Eigen::Dynamic

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

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,52 +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 | _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_._._. │ │ │ │ +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_O_<_ _N_ _> │ │ │ │ -  Manifold of special orthogonal rotation matrices SO. _M_o_r_e_._._. │ │ │ │ + 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_._._. │ │ │ │   │ │ │ │ -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_:_:_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_O_<_ _N_ _>_ _> │ │ │ │ +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_O_<_ _N_ _>_ _> │ │ │ │ + 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::::SSOOnn = _S_O< Eigen::Dynamic > │ │ │ │ +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::::DDyynnaammiiccJJaaccoobbiiaann = _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< Eigen::Dynamic, Eigen:: │ │ │ │ - Dynamic > │ │ │ │ +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 │ │ │ │ -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. │ │ │ │ + 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 ********** │ │ │ │ -N*N matrix representation of SO(N). │ │ │ │ -N can be Eigen::Dynamic │ │ │ │ +Functions for triangulation. │ │ │ │ + Date │ │ │ │ + July 31, 2013 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Chris Beall │ │ │ │ + Akshay Krishnan │ │ │ │ Date │ │ │ │ - March 2019 │ │ │ │ + July 31, 2013 │ │ │ │ + Author │ │ │ │ + Chris Beall │ │ │ │ + Luca Carlone │ │ │ │ + Akshay Krishnan │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_._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/a00323.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,30 @@ │ │ │ │ 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::TriangulationUnderconstrainedException", "a03364.html", null], │ │ │ │ + ["gtsam::TriangulationCheiralityException", "a03368.html", null], │ │ │ │ + ["gtsam::TriangulationParameters", "a03372.html", "a03372"], │ │ │ │ + ["gtsam::TriangulationResult", "a03376.html", "a03376"], │ │ │ │ + ["calibrateMeasurements", "a00323.html#aebe53b43e5151ce9c355b4aa4ba57c13", null], │ │ │ │ + ["calibrateMeasurements", "a00323.html#a48ad2c1085fcae3881fa956f4cd81890", null], │ │ │ │ + ["calibrateMeasurementsShared", "a00323.html#a0a386184e9ed9cc4ec844d48d91ba759", null], │ │ │ │ + ["createPinholeCalibration", "a00323.html#a3d070e707c4b2d69d0f024a30501f06c", null], │ │ │ │ + ["optimize", "a00323.html#a4b0057879b0c5f323185452b0d1a4232", null], │ │ │ │ + ["triangulateDLT", "a00323.html#aed2918ac0049316bf09f96879efca3b6", null], │ │ │ │ + ["triangulateDLT", "a00323.html#a523a0528f883f1c569a8a4c9a0e514a0", null], │ │ │ │ + ["triangulateHomogeneousDLT", "a00323.html#af378e231b519e8bb1f09f4aa13a38dca", null], │ │ │ │ + ["triangulateHomogeneousDLT", "a00323.html#a8d16887f8890aaf7ceb5e3cbb181a191", null], │ │ │ │ + ["triangulateLOST", "a00323.html#a0f9e5111ffc481b34f0123418b0ecd13", null], │ │ │ │ + ["triangulateNonlinear", "a00323.html#a13ac0858b6f6600f5a4242aeb797692f", null], │ │ │ │ + ["triangulateNonlinear", "a00323.html#a9dab6b5829b51511735b6b841bb36a36", null], │ │ │ │ + ["triangulatePoint3", "a00323.html#a58f4009e3a8872d0ac6780d654cccc2e", null], │ │ │ │ + ["triangulatePoint3", "a00323.html#aac6df5bbfb7131cbb05e2a9691e59ba3", null], │ │ │ │ + ["triangulatePoint3", "a00323.html#ab79854d3cb3bcc4f562fc88a0731a447", null], │ │ │ │ + ["triangulateSafe", "a00323.html#a8d52d7d8a5e5c8d7318ce95ee57e9cfa", null], │ │ │ │ + ["triangulationGraph", "a00323.html#a2b96bc32f3c5c436db3fe60e5139319e", null], │ │ │ │ + ["triangulationGraph", "a00323.html#ad167fac94fa72c0d3b8db36e5fa2becb", null], │ │ │ │ + ["undistortMeasurementInternal", "a00323.html#a46a14c34d729a626825e4eff8a7de8dd", null], │ │ │ │ + ["undistortMeasurements", "a00323.html#af01b2988c1bb89268ad572ea7d7ba293", null], │ │ │ │ + ["undistortMeasurements", "a00323.html#a31e52d463db397f0dda1a13352ab217c", null], │ │ │ │ + ["undistortMeasurements", "a00323.html#a1a0e4ac1b773cc295daae7849c833876", null], │ │ │ │ + ["undistortMeasurements", "a00323.html#a7f3d15de99fffcc537089fa1440d8ca2", null], │ │ │ │ + ["undistortMeasurements", "a00323.html#a6a1849035b3acd163d6de715e7683ebf", 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/triangulation.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,400 +98,675 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
SOn.h
│ │ │ +
triangulation.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>
│ │ │ -
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}
│ │ │ -
│ │ │ -
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
│ │ │ -
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>;
│ │ │ -
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 }
│ │ │ -
│ │ │ -
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) {}
│ │ │ -
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);
│ │ │ -
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 }
│ │ │ -
│ │ │ -
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 }
│ │ │ -
│ │ │ -
149
│ │ │ -
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(); }
│ │ │ -
159
│ │ │ -
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 }
│ │ │ -
│ │ │ +
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};
│ │ │ +
│ │ │ +
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);
│ │ │ +
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
│ │ │ -
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);
│ │ │ +
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
│ │ │ -
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};
│ │ │ +
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}
│ │ │
│ │ │ -
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>> {};
│ │ │ +
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
│ │ │ -
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)
│ │ │ +
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
│ │ │ +
Base class to create smart factors on poses or cameras.
│ │ │ +
2D Pose
│ │ │ +
Calibrated camera with spherical projection.
│ │ │ +
Calibration used by Bundler.
│ │ │ +
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.
│ │ │ +
Factor Graph consisting of non-linear factors.
│ │ │
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ +
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,507 +1,815 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -SOn.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-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 │ │ │ │ -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} │ │ │ │ -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 │ │ │ │ -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; │ │ │ │ -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 } │ │ │ │ -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) {} │ │ │ │ -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); │ │ │ │ -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 } │ │ │ │ -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 } │ │ │ │ -149 │ │ │ │ -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(); } │ │ │ │ -159 │ │ │ │ -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 } │ │ │ │ +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 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 │ │ │ │ -_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); │ │ │ │ +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 │ │ │ │ -_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; │ │ │ │ +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 │ │ │ │ -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 │ │ │ │ -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> {}; │ │ │ │ +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 │ │ │ │ -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. │ │ │ │ -_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) │ │ │ │ +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_m_e_r_a_S_e_t_._h │ │ │ │ +Base class to create smart factors on poses or cameras. │ │ │ │ +_P_o_s_e_2_._h │ │ │ │ +2D Pose │ │ │ │ +_S_p_h_e_r_i_c_a_l_C_a_m_e_r_a_._h │ │ │ │ +Calibrated camera with spherical projection. │ │ │ │ +_C_a_l_3_B_u_n_d_l_e_r_._h │ │ │ │ +Calibration used by Bundler. │ │ │ │ +_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. │ │ │ │ +_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_:_:_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_:_:_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_:_:_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 │ │ │ │ -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_:_:_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 │ │ │ │ -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_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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ -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_:_:_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_:_:_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_O_n_._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/a00326.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/BearingRange.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
SOn.cpp File Reference
│ │ │ +
BearingRange.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Definitions of dynamic specializations of SO(n) │ │ │ +

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

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

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::traits< BearingRange< A1, A2 > >
 
struct  gtsam::HasBearing< A1, A2, RT >
 
struct  gtsam::HasRange< A1, A2, RT >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Definitions of dynamic specializations of SO(n)

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

Bearing-Range product.

│ │ │ +
Date
July, 2015
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,38 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_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_._._. │ │ │ │ +_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 │ │ │ │ +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_:_:_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_:_:_H_a_s_B_e_a_r_i_n_g_<_ _A_1_,_ _A_2_,_ _R_T_ _> │ │ │ │ +  │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Definitions of dynamic specializations of SO(n) │ │ │ │ +Bearing-Range product. │ │ │ │ + Date │ │ │ │ + July, 2015 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Varun Agrawal │ │ │ │ - Date │ │ │ │ - March 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_._c_p_p │ │ │ │ + * _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/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/Pose2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
SOn-inl.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Pose2.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Template implementations for SO(n) │ │ │ +

2D Pose │ │ │ 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 Pose2 &pose)
 
│ │ │

Detailed Description

│ │ │ -

Template implementations for SO(n)

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

2D Pose

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,21 @@ │ │ │ │ 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_._._. │ │ │ │ -_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 │ │ │ │ +Pose2.cpp File Reference │ │ │ │ +2D 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) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Template implementations for SO(n) │ │ │ │ - Author │ │ │ │ - Frank Dellaert │ │ │ │ - Date │ │ │ │ - March 2019 │ │ │ │ +2D Pose │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_n_-_i_n_l_._h │ │ │ │ + * _P_o_s_e_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/a00332_source.html │ │ │ @@ -114,20 +114,20 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
20#pragma once
│ │ │
21
│ │ │ -
22#include <gtsam/geometry/SOn.h>
│ │ │ +
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>
│ │ │ +
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>
│ │ │
29
│ │ │
30#include <string>
│ │ │
31
│ │ │
32namespace gtsam {
│ │ │
33
│ │ │
34using SO4 = SO<4>;
│ │ │ @@ -203,19 +203,19 @@ │ │ │
110template <>
│ │ │
111struct traits<SO4> : public internal::LieGroup<SO4> {};
│ │ │
112
│ │ │
113template <>
│ │ │
114struct traits<const SO4> : public internal::LieGroup<SO4> {};
│ │ │
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).
│ │ │ +
Base class and basic functions for Lie types.
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
Concept check class for variable types with Group properties.
│ │ │ +
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
│ │ │
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
│ │ │
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
│ │ │
Both LieGroupTraits and Testable.
Definition Lie.h:229
│ │ │ ├── html2text {} │ │ │ │ @@ -106,20 +106,20 @@ │ │ │ │ 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 {}; │ │ │ │ 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 {}; │ │ │ │ 115 │ │ │ │ 116} // end namespace gtsam │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ _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. │ │ │ │ -_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). │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ ├── ./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/SphericalCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,52 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
SO4.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
SphericalCamera.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

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) \).
 
│ │ │

Detailed Description

│ │ │ -

4*4 matrix representation of SO(4)

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

Calibrated camera with spherical projection.

│ │ │ +
Date
Aug 26, 2021
│ │ │ +
Author
Luca Carlone
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +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 │ │ │ │ -SO4.cpp 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 │ │ │ │ +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 │ │ │ │ - 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) \). │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -4*4 matrix representation of SO(4) │ │ │ │ +Calibrated camera with spherical projection. │ │ │ │ + Date │ │ │ │ + Aug 26, 2021 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ Luca Carlone │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_4_._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/a00335.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00335 = [ │ │ │ │ - ["stiefel", "a00335.html#a3e57e4771f13855a495ec2c6454c9121", null], │ │ │ │ - ["topLeft", "a00335.html#a8d21728e3da4cf1a96e1b6f87a97da47", null] │ │ │ │ + ["gtsam::traits< SphericalCamera >", "a03328.html", null], │ │ │ │ + ["gtsam::traits< const SphericalCamera >", "a03332.html", null] │ │ │ │ ]; │ │ ├── ./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/StereoPoint2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,117 +94,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
SO3.h File Reference
│ │ │ +
StereoPoint2.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

3*3 matrix representation of SO(3) │ │ │ -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
 
│ │ │ +ostream & gtsam::operator<< (ostream &os, const StereoPoint2 &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.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
Date
Jan 26, 2010
│ │ │ +
Author
dellaert
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,61 +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 │ │ │ │ -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 │ │ │ │ +StereoPoint2.cpp File Reference │ │ │ │ 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 │ │ │ │ +ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const _S_t_e_r_e_o_P_o_i_n_t_2 &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. │ │ │ │ + Jan 26, 2010 │ │ │ │ + Author │ │ │ │ + dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_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/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/Cal3Unified.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,87 +96,39 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
SO3.cpp File Reference
│ │ │ +
Cal3Unified.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

3*3 matrix representation of SO(3) │ │ │ -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.
 
│ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Cal3Unified &cal)
 
│ │ │

Detailed Description

│ │ │ -

3*3 matrix representation of SO(3)

│ │ │ -
Author
Frank Dellaert
│ │ │ -
│ │ │ -Luca Carlone
│ │ │ +
Date
Mar 8, 2014
│ │ │ +
Author
Jing Dong
│ │ │
│ │ │ -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.

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +Varun Agrawal │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,41 +1,24 @@ │ │ │ │ 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_._._. │ │ │ │ +Cal3Unified.cpp File Reference │ │ │ │ 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 │ │ │ │ -  │ │ │ │ - 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. │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3_U_n_i_f_i_e_d &cal) │ │ │ │   │ │ │ │ ********** 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. │ │ │ │ + Mar 8, 2014 │ │ │ │ + Author │ │ │ │ + Jing Dong │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _S_O_3_._c_p_p │ │ │ │ + * _C_a_l_3_U_n_i_f_i_e_d_._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/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/SO3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -93,27 +93,90 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Rot3Q.cpp File Reference
│ │ │ +
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
SO3.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Rotation (internal: quaternion representation*) │ │ │ +

3*3 matrix representation of SO(3) │ │ │ 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.
 
│ │ │

Detailed Description

│ │ │ -

Rotation (internal: quaternion representation*)

│ │ │ -
Author
Richard Roberts
│ │ │ -
│ │ │ +

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,15 +1,41 @@ │ │ │ │ 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 │ │ │ │ +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. │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +GTSAM_EXPORT Matrix99  ggttssaamm::::ssoo33::::DDccoommppoossee (const _S_O_3 &R) │ │ │ │ +  (constant) Jacobian of compose wrpt M │ │ │ │ +  │ │ │ │ + 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 ********** │ │ │ │ -Rotation (internal: quaternion representation*) │ │ │ │ +3*3 matrix representation of SO(3) │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + 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 │ │ │ │ - * _R_o_t_3_Q_._c_p_p │ │ │ │ + * _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/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/Pose3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,84 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
Rot3.h File Reference
│ │ │ +
Pose3.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

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

3D Pose │ │ │ 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

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'.
 
│ │ │ +std::ostream & gtsam::operator<< (std::ostream &os, const Pose3 &pose)
 
│ │ │

Detailed Description

│ │ │ -

3D rotation represented as a rotation matrix or quaternion

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

3D Pose

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,56 +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 | _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_ _> │ │ │ │ -  │ │ │ │ +_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_._._. │ │ │ │ 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'. │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _P_o_s_e_3 &pose) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D rotation represented as a rotation matrix or quaternion │ │ │ │ - Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ - Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ - Luca Carlone │ │ │ │ - Varun Agrawal │ │ │ │ +3D Pose │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_._h │ │ │ │ + * _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/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/Cal3Bundler.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,53 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Rot3.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
Cal3Bundler.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

Calibration used by Bundler. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::Cal3Bundler
 Calibration used by Bundler. More...
 
struct  gtsam::traits< Cal3Bundler >
 
struct  gtsam::traits< const Cal3Bundler >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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
│ │ │ +

Calibration used by Bundler.

│ │ │ +
Date
Sep 25, 2010
│ │ │ +
Author
Yong Dian Jian
│ │ │
│ │ │ Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,32 @@ │ │ │ │ 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_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cal3Bundler.h File Reference │ │ │ │ +Calibration used by Bundler. _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_B_u_n_d_l_e_r │ │ │ │ +  Calibration used by Bundler. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_B_u_n_d_l_e_r_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3_B_u_n_d_l_e_r_ _> │ │ │ │ +  │ │ │ │ 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. │ │ │ │ +Calibration used by Bundler. │ │ │ │ + Date │ │ │ │ + Sep 25, 2010 │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ - Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ + Yong Dian Jian │ │ │ │ Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_3_._c_p_p │ │ │ │ + * _C_a_l_3_B_u_n_d_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/a00353.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ var a00353 = [ │ │ │ │ - ["RQ", "a00353.html#a5172b5b6d51bd5348c7e551e1376f60a", null] │ │ │ │ + ["gtsam::traits< Cal3Bundler >", "a02972.html", null], │ │ │ │ + ["gtsam::traits< const Cal3Bundler >", "a02976.html", null] │ │ │ │ ]; │ │ ├── ./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/SO4.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,53 +94,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
Rot2.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
SO4.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

2D rotation │ │ │ +

4*4 matrix representation of SO(4) │ │ │ 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.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +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) \).
 
│ │ │

Detailed Description

│ │ │ -

2D rotation

│ │ │ -
Date
Dec 9, 2009
│ │ │ +

4*4 matrix representation of SO(4)

│ │ │
Author
Frank Dellaert
│ │ │
│ │ │ -John Lambert
│ │ │ +Luca Carlone │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +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 │ │ │ │ -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 | _F_u_n_c_t_i_o_n_s │ │ │ │ +SO4.cpp File Reference │ │ │ │ +4*4 matrix representation of SO(4) _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) \). │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D rotation │ │ │ │ - Date │ │ │ │ - Dec 9, 2009 │ │ │ │ +4*4 matrix representation of SO(4) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - John Lambert │ │ │ │ + Luca Carlone │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_2_._h │ │ │ │ + * _S_O_4_._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/a00356.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,4 @@ │ │ │ │ var a00356 = [ │ │ │ │ - ["gtsam::Rot2::ChartAtOrigin", "a03216.html", null], │ │ │ │ - ["gtsam::traits< Rot2 >", "a03220.html", null], │ │ │ │ - ["gtsam::traits< const Rot2 >", "a03224.html", null] │ │ │ │ + ["stiefel", "a00356.html#a3e57e4771f13855a495ec2c6454c9121", null], │ │ │ │ + ["topLeft", "a00356.html#a8d21728e3da4cf1a96e1b6f87a97da47", null] │ │ │ │ ]; │ │ ├── ./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/Point3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,64 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
Rot2.cpp File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Point3.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

2D Rotations │ │ │ +

3D Point │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ +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)
 
│ │ │

Detailed Description

│ │ │ -

2D Rotations

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

3D Point

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,45 @@ │ │ │ │ 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_._._. │ │ │ │ +_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_._._. │ │ │ │ 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 │ │ │ │ +  │ │ │ │ +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 ********** │ │ │ │ -2D Rotations │ │ │ │ - Date │ │ │ │ - Dec 9, 2009 │ │ │ │ - Author │ │ │ │ - Frank Dellaert │ │ │ │ +3D Point │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _R_o_t_2_._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/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/PinholeCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,56 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Typedefs
│ │ │ -
Quaternion.h File Reference
│ │ │ +Namespaces
│ │ │ +
PinholeCamera.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Lie Group wrapper for Eigen Quaternions. │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  gtsam::traits< QUATERNION_TYPE >
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Macros

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

│ │ │ -Typedefs

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

Detailed Description

│ │ │ -

Lie Group wrapper for Eigen Quaternions.

│ │ │ -
Author
Frank Dellaert
│ │ │ +

Base class for all pinhole cameras.

│ │ │ +
Author
Yong-Dian Jian
│ │ │ +
Date
Jan 27, 2012
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +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 | _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_._._. │ │ │ │ +_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 │ │ │ │ -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_ _> │ │ │ │ + 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. │ │ │ │   │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  QQUUAATTEERRNNIIOONN__TTYYPPEE   Eigen::Quaternion<_Scalar,_Options> │ │ │ │ -  │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -typedef Eigen::Quaternion< double, Eigen::DontAlign >  ggttssaamm::::QQuuaatteerrnniioonn │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Lie Group wrapper for Eigen Quaternions. │ │ │ │ +Base class for all pinhole cameras. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Yong-Dian Jian │ │ │ │ + Date │ │ │ │ + Jan 27, 2012 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ + * _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/a00362.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ var a00362 = [ │ │ │ │ - ["gtsam::traits< QUATERNION_TYPE >", "a03208.html", null] │ │ │ │ + ["gtsam::traits< PinholeCamera< Calibration > >", "a03108.html", null], │ │ │ │ + ["gtsam::traits< const PinholeCamera< Calibration > >", "a03112.html", null], │ │ │ │ + ["gtsam::Range< PinholeCamera< Calibration >, T >", "a03116.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00362_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Quaternion.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeCamera.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,200 +98,400 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Quaternion.h
│ │ │ +
PinholeCamera.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/Lie.h>
│ │ │ -
21#include <gtsam/base/concepts.h>
│ │ │ -
22#include <gtsam/geometry/SO3.h> // Logmap/Expmap derivatives
│ │ │ -
23#include <limits>
│ │ │ -
24#include <iostream>
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │
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
│ │ │ -
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;
│ │ │ +
32template<typename Calibration>
│ │ │ +
│ │ │ +
33class PinholeCamera: public PinholeBaseK<Calibration> {
│ │ │ +
34
│ │ │ +
35public:
│ │ │ +
36
│ │ │ + │ │ │ +
42 typedef Point2Vector MeasurementVector;
│ │ │ +
43
│ │ │ +
44private:
│ │ │ +
45
│ │ │ + │ │ │ +
47 Calibration K_;
│ │ │ +
48
│ │ │ +
49 // Get dimensions of calibration type at compile time
│ │ │ +
50 static const int DimK = FixedDimension<Calibration>::value;
│ │ │ +
51
│ │ │ +
52public:
│ │ │
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;
│ │ │ +
54 enum {
│ │ │ +
55 dimension = 6 + DimK
│ │ │ +
56 };
│ │ │ +
57
│ │ │ +
60
│ │ │ +
│ │ │ + │ │ │ +
63 }
│ │ │ +
│ │ │ +
64
│ │ │ +
│ │ │ +
66 explicit PinholeCamera(const Pose3& pose) :
│ │ │ +
67 Base(pose) {
│ │ │ +
68 }
│ │ │ +
│ │ │ +
69
│ │ │ +
│ │ │ +
71 PinholeCamera(const Pose3& pose, const Calibration& K) :
│ │ │ +
72 Base(pose), K_(K) {
│ │ │ +
73 }
│ │ │ +
│ │ │ +
74
│ │ │ +
78
│ │ │ +
│ │ │ +
86 static PinholeCamera Level(const Calibration &K, const Pose2& pose2,
│ │ │ +
87 double height) {
│ │ │ +
88 return PinholeCamera(Base::LevelPose(pose2, height), K);
│ │ │ +
89 }
│ │ │ +
│ │ │ +
90
│ │ │ +
│ │ │ +
92 static PinholeCamera Level(const Pose2& pose2, double height) {
│ │ │ +
93 return PinholeCamera::Level(Calibration(), pose2, height);
│ │ │ +
94 }
│ │ │ +
│ │ │ +
95
│ │ │ +
│ │ │ +
105 static PinholeCamera Lookat(const Point3& eye, const Point3& target,
│ │ │ +
106 const Point3& upVector, const Calibration& K = Calibration()) {
│ │ │ +
107 return PinholeCamera(Base::LookatPose(eye, target, upVector), K);
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
110 // Create PinholeCamera, with derivatives
│ │ │ +
111 static PinholeCamera Create(const Pose3& pose, const Calibration &K,
│ │ │ +
112 OptionalJacobian<dimension, 6> H1 = boost::none, //
│ │ │ +
113 OptionalJacobian<dimension, DimK> H2 = boost::none) {
│ │ │ +
114 typedef Eigen::Matrix<double, DimK, 6> MatrixK6;
│ │ │ +
115 if (H1)
│ │ │ +
116 *H1 << I_6x6, MatrixK6::Zero();
│ │ │ +
117 typedef Eigen::Matrix<double, 6, DimK> Matrix6K;
│ │ │ +
118 typedef Eigen::Matrix<double, DimK, DimK> MatrixK;
│ │ │ +
119 if (H2)
│ │ │ +
120 *H2 << Matrix6K::Zero(), MatrixK::Identity();
│ │ │ +
121 return PinholeCamera(pose,K);
│ │ │ +
122 }
│ │ │ +
123
│ │ │ +
127
│ │ │ +
│ │ │ +
129 explicit PinholeCamera(const Vector &v) :
│ │ │ +
130 Base(v.head<6>()) {
│ │ │ +
131 if (v.size() > 6)
│ │ │ +
132 K_ = Calibration(v.tail<DimK>());
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
│ │ │ +
136 PinholeCamera(const Vector &v, const Vector &K) :
│ │ │ +
137 Base(v), K_(K) {
│ │ │ +
138 }
│ │ │ +
│ │ │ +
139
│ │ │ +
143
│ │ │ +
│ │ │ +
145 bool equals(const Base &camera, double tol = 1e-9) const {
│ │ │ +
146 const PinholeCamera* e = dynamic_cast<const PinholeCamera*>(&camera);
│ │ │ +
147 return Base::equals(camera, tol) && K_.equals(e->calibration(), tol);
│ │ │ +
148 }
│ │ │ +
│ │ │ +
149
│ │ │ +
│ │ │ +
151 void print(const std::string& s = "PinholeCamera") const override {
│ │ │ +
152 Base::print(s);
│ │ │ +
153 K_.print(s + ".calibration");
│ │ │ +
154 }
│ │ │ +
│ │ │ +
155
│ │ │ +
159
│ │ │ +
160 ~PinholeCamera() override {
│ │ │ +
161 }
│ │ │ +
162
│ │ │ +
│ │ │ +
164 const Pose3& pose() const {
│ │ │ +
165 return Base::pose();
│ │ │ +
166 }
│ │ │ +
│ │ │ +
167
│ │ │ +
│ │ │ + │ │ │ +
170 if (H) {
│ │ │ +
171 H->setZero();
│ │ │ +
172 H->template block<6, 6>(0, 0) = I_6x6;
│ │ │ +
173 }
│ │ │ +
174 return Base::pose();
│ │ │
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};
│ │ │ +
│ │ │ +
176
│ │ │ +
│ │ │ +
178 const Calibration& calibration() const override {
│ │ │ +
179 return K_;
│ │ │ +
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)
│ │ │ +
│ │ │ +
187 size_t dim() const {
│ │ │ +
188 return dimension;
│ │ │ +
189 }
│ │ │ +
│ │ │ +
190
│ │ │ +
│ │ │ +
192 static size_t Dim() {
│ │ │ +
193 return dimension;
│ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
196 typedef Eigen::Matrix<double, dimension, 1> VectorK6;
│ │ │ +
197
│ │ │ +
│ │ │ +
199 PinholeCamera retract(const Vector& d) const {
│ │ │ +
200 if ((size_t) d.size() == 6)
│ │ │ +
201 return PinholeCamera(this->pose().retract(d), calibration());
│ │ │ +
202 else
│ │ │ +
203 return PinholeCamera(this->pose().retract(d.head<6>()),
│ │ │ +
204 calibration().retract(d.tail(calibration().dim())));
│ │ │ +
205 }
│ │ │ +
│ │ │ +
206
│ │ │ +
│ │ │ +
208 VectorK6 localCoordinates(const PinholeCamera& T2) const {
│ │ │ +
209 VectorK6 d;
│ │ │ +
210 d.template head<6>() = this->pose().localCoordinates(T2.pose());
│ │ │ +
211 d.template tail<DimK>() = calibration().localCoordinates(T2.calibration());
│ │ │ +
212 return d;
│ │ │ +
213 }
│ │ │ +
│ │ │ +
214
│ │ │ +
│ │ │ + │ │ │ +
217 return PinholeCamera(); // assumes that the default constructor is valid
│ │ │ +
218 }
│ │ │ +
│ │ │ +
219
│ │ │ +
223
│ │ │ +
224 typedef Eigen::Matrix<double, 2, DimK> Matrix2K;
│ │ │ +
225
│ │ │ +
229 template<class POINT>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
232 // We just call 3-derivative version in Base
│ │ │ +
233 if (Dcamera){
│ │ │ +
234 Matrix26 Dpose;
│ │ │ +
235 Eigen::Matrix<double, 2, DimK> Dcal;
│ │ │ +
236 const Point2 pi = Base::project(pw, Dpose, Dpoint, Dcal);
│ │ │ +
237 *Dcamera << Dpose, Dcal;
│ │ │ +
238 return pi;
│ │ │ +
239 } else {
│ │ │ +
240 return Base::project(pw, boost::none, Dpoint, boost::none);
│ │ │ +
241 }
│ │ │ +
242 }
│ │ │ +
│ │ │ +
243
│ │ │ +
│ │ │ + │ │ │ +
246 boost::none, OptionalJacobian<2, 3> Dpoint = boost::none) const {
│ │ │ +
247 return _project2(pw, Dcamera, Dpoint);
│ │ │ +
248 }
│ │ │ +
│ │ │ +
249
│ │ │ +
│ │ │ + │ │ │ +
252 boost::none, OptionalJacobian<2, 2> Dpoint = boost::none) const {
│ │ │ +
253 return _project2(pw, Dcamera, Dpoint);
│ │ │ +
254 }
│ │ │ +
│ │ │ +
255
│ │ │ +
│ │ │ +
261 double range(const Point3& point, OptionalJacobian<1, dimension> Dcamera =
│ │ │ +
262 boost::none, OptionalJacobian<1, 3> Dpoint = boost::none) const {
│ │ │ +
263 Matrix16 Dpose_;
│ │ │ +
264 double result = this->pose().range(point, Dcamera ? &Dpose_ : 0, Dpoint);
│ │ │ +
265 if (Dcamera)
│ │ │ +
266 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ +
267 return result;
│ │ │ +
268 }
│ │ │ +
│ │ │ +
269
│ │ │ +
│ │ │ + │ │ │ +
276 boost::none, OptionalJacobian<1, 6> Dpose = boost::none) const {
│ │ │ +
277 Matrix16 Dpose_;
│ │ │ +
278 double result = this->pose().range(pose, Dcamera ? &Dpose_ : 0, Dpose);
│ │ │ +
279 if (Dcamera)
│ │ │ +
280 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ +
281 return result;
│ │ │ +
282 }
│ │ │ +
│ │ │ +
283
│ │ │ +
289 template<class CalibrationB>
│ │ │ +
│ │ │ +
290 double range(const PinholeCamera<CalibrationB>& camera,
│ │ │ +
291 OptionalJacobian<1, dimension> Dcamera = boost::none,
│ │ │ +
292 OptionalJacobian<1, 6 + CalibrationB::dimension> Dother = boost::none) const {
│ │ │ +
293 Matrix16 Dcamera_, Dother_;
│ │ │ +
294 double result = this->pose().range(camera.pose(), Dcamera ? &Dcamera_ : 0,
│ │ │ +
295 Dother ? &Dother_ : 0);
│ │ │ +
296 if (Dcamera) {
│ │ │ +
297 *Dcamera << Dcamera_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ +
298 }
│ │ │ +
299 if (Dother) {
│ │ │ +
300 Dother->setZero();
│ │ │ +
301 Dother->template block<1, 6>(0, 0) = Dother_;
│ │ │ +
302 }
│ │ │ +
303 return result;
│ │ │ +
304 }
│ │ │ +
│ │ │ +
305
│ │ │ +
│ │ │ +
311 double range(const CalibratedCamera& camera,
│ │ │ +
312 OptionalJacobian<1, dimension> Dcamera = boost::none,
│ │ │ +
313 OptionalJacobian<1, 6> Dother = boost::none) const {
│ │ │ +
314 return range(camera.pose(), Dcamera, Dother);
│ │ │ +
315 }
│ │ │ +
│ │ │ +
316
│ │ │ +
│ │ │ +
318 Matrix34 cameraProjectionMatrix() const {
│ │ │ +
319 return K_.K() * PinholeBase::pose().inverse().matrix().block(0, 0, 3, 4);
│ │ │ +
320 }
│ │ │ +
│ │ │ +
321
│ │ │ +
│ │ │ + │ │ │ +
324 return Eigen::Matrix<double,traits<Point2>::dimension,1>::Constant(2.0 * K_.fx());;
│ │ │ +
325 }
│ │ │ +
│ │ │ +
326
│ │ │ +
327private:
│ │ │ +
328
│ │ │ + │ │ │ +
331 template<class Archive>
│ │ │ +
332 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ +
333 ar
│ │ │ +
334 & boost::serialization::make_nvp("PinholeBaseK",
│ │ │ +
335 boost::serialization::base_object<Base>(*this));
│ │ │ +
336 ar & BOOST_SERIALIZATION_NVP(K_);
│ │ │ +
337 }
│ │ │ +
338
│ │ │ +
339public:
│ │ │ + │ │ │ +
341};
│ │ │ +
│ │ │ +
342
│ │ │ +
343// manifold traits
│ │ │ +
344
│ │ │ +
345template <typename Calibration>
│ │ │ +
│ │ │ +
346struct traits<PinholeCamera<Calibration> >
│ │ │ +
347 : public internal::Manifold<PinholeCamera<Calibration> > {};
│ │ │ +
│ │ │ +
348
│ │ │ +
349template <typename Calibration>
│ │ │ +
│ │ │ +
350struct traits<const PinholeCamera<Calibration> >
│ │ │ +
351 : public internal::Manifold<PinholeCamera<Calibration> > {};
│ │ │ +
│ │ │ +
352
│ │ │ +
353// range traits, used in RangeFactor
│ │ │ +
354template <typename Calibration, typename T>
│ │ │ +
355struct Range<PinholeCamera<Calibration>, T> : HasRange<PinholeCamera<Calibration>, T, double> {};
│ │ │ +
356
│ │ │ +
357} // \ gtsam
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ +
Bearing-Range product.
│ │ │ +
Pinhole camera with known calibration.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ +
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
│ │ │
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
│ │ │ +
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
│ │ │ +
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
│ │ │ -
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
│ │ │ +
Definition BearingRange.h:40
│ │ │ +
Definition BearingRange.h:194
│ │ │ +
static Matrix26 Dpose(const Point2 &pn, double d)
Calculate Jacobian with respect to pose.
Definition CalibratedCamera.cpp:27
│ │ │ +
virtual void print(const std::string &s="PinholeBase") const
print
Definition CalibratedCamera.cpp:74
│ │ │ +
const Pose3 & pose() const
return pose, constant version
Definition CalibratedCamera.h:152
│ │ │ +
static Pose3 LevelPose(const Pose2 &pose2, double height)
Create a level pose at the given 2D pose and height.
Definition CalibratedCamera.cpp:49
│ │ │ +
bool equals(const PinholeBase &camera, double tol=1e-9) const
assert equality up to a tolerance
Definition CalibratedCamera.cpp:69
│ │ │ +
static Matrix23 Dpoint(const Point2 &pn, double d, const Matrix3 &Rt)
Calculate Jacobian with respect to point.
Definition CalibratedCamera.cpp:37
│ │ │ +
static Pose3 LookatPose(const Point3 &eye, const Point3 &target, const Point3 &upVector)
Create a camera pose at the given eye position looking at a target point in the scene with the specif...
Definition CalibratedCamera.cpp:58
│ │ │ +
A Calibrated camera class [R|-R't], calibration K=I.
Definition CalibratedCamera.h:247
│ │ │ +
A pinhole camera class that has a Pose3 and a Calibration.
Definition PinholeCamera.h:33
│ │ │ +
void print(const std::string &s="PinholeCamera") const override
print
Definition PinholeCamera.h:151
│ │ │ +
Point2 _project2(const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const
Templated projection of a 3D point or a point at infinity into the image.
Definition PinholeCamera.h:230
│ │ │ +
Vector defaultErrorWhenTriangulatingBehindCamera() const
for Nonlinear Triangulation
Definition PinholeCamera.h:323
│ │ │ +
const Calibration & calibration() const override
return calibration
Definition PinholeCamera.h:178
│ │ │ +
const Pose3 & getPose(OptionalJacobian< 6, dimension > H) const
return pose, with derivative
Definition PinholeCamera.h:169
│ │ │ +
Point2 project2(const Point3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
project a 3D point from world coordinates into the image
Definition PinholeCamera.h:245
│ │ │ +
PinholeCamera(const Pose3 &pose)
constructor with pose
Definition PinholeCamera.h:66
│ │ │ +
static PinholeCamera Level(const Pose2 &pose2, double height)
PinholeCamera::level with default calibration.
Definition PinholeCamera.h:92
│ │ │ +
PinholeCamera(const Pose3 &pose, const Calibration &K)
constructor with pose and calibration
Definition PinholeCamera.h:71
│ │ │ +
static PinholeCamera Level(const Calibration &K, const Pose2 &pose2, double height)
Create a level camera at the given 2D pose and height.
Definition PinholeCamera.h:86
│ │ │ +
size_t dim() const
Definition PinholeCamera.h:187
│ │ │ +
static PinholeCamera Identity()
for Canonical
Definition PinholeCamera.h:216
│ │ │ +
static size_t Dim()
Definition PinholeCamera.h:192
│ │ │ +
bool equals(const Base &camera, double tol=1e-9) const
assert equality up to a tolerance
Definition PinholeCamera.h:145
│ │ │ +
double range(const Pose3 &pose, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const
Calculate range to another pose.
Definition PinholeCamera.h:275
│ │ │ +
double range(const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6+CalibrationB::dimension > Dother=boost::none) const
Calculate range to another camera.
Definition PinholeCamera.h:290
│ │ │ +
PinholeCamera(const Vector &v, const Vector &K)
Init from Vector and calibration.
Definition PinholeCamera.h:136
│ │ │ +
static PinholeCamera Lookat(const Point3 &eye, const Point3 &target, const Point3 &upVector, const Calibration &K=Calibration())
Create a camera at the given eye position looking at a target point in the scene with the specified u...
Definition PinholeCamera.h:105
│ │ │ +
Matrix34 cameraProjectionMatrix() const
for Linear Triangulation
Definition PinholeCamera.h:318
│ │ │ +
VectorK6 localCoordinates(const PinholeCamera &T2) const
return canonical coordinate
Definition PinholeCamera.h:208
│ │ │ +
PinholeCamera retract(const Vector &d) const
move a cameras according to d
Definition PinholeCamera.h:199
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition PinholeCamera.h:330
│ │ │ +
Point2 project2(const Unit3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
project a point at infinity from world coordinates into the image
Definition PinholeCamera.h:251
│ │ │ +
const Pose3 & pose() const
return pose
Definition PinholeCamera.h:164
│ │ │ +
PinholeCamera(const Vector &v)
Init from vector, can be 6D (default calibration) or dim.
Definition PinholeCamera.h:129
│ │ │ +
PinholeCamera()
default constructor
Definition PinholeCamera.h:62
│ │ │ +
Point2 Measurement
Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes...
Definition PinholeCamera.h:41
│ │ │ +
double range(const CalibratedCamera &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const
Calculate range to a calibrated camera.
Definition PinholeCamera.h:311
│ │ │ +
double range(const Point3 &point, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const
Calculate range to a landmark.
Definition PinholeCamera.h:261
│ │ │ +
A pinhole camera class that has a Pose3 and a fixed Calibration.
Definition PinholePose.h:34
│ │ │ +
Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none, OptionalJacobian< 2, DimK > Dcal=boost::none) const
project a 3D point from world coordinates into the image
Definition PinholePose.h:118
│ │ │ +
A 2D pose (Point2,Rot2)
Definition Pose2.h:36
│ │ │ +
A 3D pose (R,t) : (Rot3,Point3)
Definition Pose3.h:37
│ │ │ +
double range(const Point3 &point, OptionalJacobian< 1, 6 > Hself=boost::none, OptionalJacobian< 1, 3 > Hpoint=boost::none) const
Calculate range to a landmark.
Definition Pose3.cpp:399
│ │ │ +
Matrix4 matrix() const
convert to 4*4 matrix
Definition Pose3.cpp:323
│ │ │ +
Pose3 inverse() const
inverse transformation with derivatives
Definition Pose3.cpp:49
│ │ │ +
Represents a 3D point on a unit sphere.
Definition Unit3.h:43
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,214 +1,513 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Quaternion.h │ │ │ │ +PinholeCamera.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_/_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 │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_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> │ │ │ │ +22#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> │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ 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 │ │ │ │ -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; │ │ │ │ +32template │ │ │ │ +_3_3class _P_i_n_h_o_l_e_C_a_m_e_r_a: public _P_i_n_h_o_l_e_B_a_s_e_K { │ │ │ │ +34 │ │ │ │ +35public: │ │ │ │ +36 │ │ │ │ +_4_1 typedef _P_o_i_n_t_2 _M_e_a_s_u_r_e_m_e_n_t; │ │ │ │ +42 typedef Point2Vector MeasurementVector; │ │ │ │ +43 │ │ │ │ +44private: │ │ │ │ +45 │ │ │ │ +46 typedef _P_i_n_h_o_l_e_B_a_s_e_K_<_C_a_l_i_b_r_a_t_i_o_n_> _B_a_s_e; │ │ │ │ +47 Calibration K_; │ │ │ │ +48 │ │ │ │ +49 // Get dimensions of calibration type at compile time │ │ │ │ +50 static const int DimK = _F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_C_a_l_i_b_r_a_t_i_o_n_>_:_:_v_a_l_u_e; │ │ │ │ +51 │ │ │ │ +52public: │ │ │ │ 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()); │ │ │ │ +54 enum { │ │ │ │ +55 dimension = 6 + DimK │ │ │ │ +56 }; │ │ │ │ +57 │ │ │ │ +60 │ │ │ │ +_6_2 _P_i_n_h_o_l_e_C_a_m_e_r_a() { │ │ │ │ +63 } │ │ │ │ +64 │ │ │ │ +_6_6 explicit _P_i_n_h_o_l_e_C_a_m_e_r_a(const _P_o_s_e_3& _p_o_s_e) : │ │ │ │ +67 _B_a_s_e(_p_o_s_e) { │ │ │ │ +68 } │ │ │ │ +69 │ │ │ │ +_7_1 _P_i_n_h_o_l_e_C_a_m_e_r_a(const _P_o_s_e_3& _p_o_s_e, const Calibration& K) : │ │ │ │ +72 _B_a_s_e(_p_o_s_e), K_(K) { │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +78 │ │ │ │ +_8_6 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_e_v_e_l(const Calibration &K, const _P_o_s_e_2& pose2, │ │ │ │ +87 double height) { │ │ │ │ +88 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_B_a_s_e_:_:_L_e_v_e_l_P_o_s_e(pose2, height), K); │ │ │ │ +89 } │ │ │ │ +90 │ │ │ │ +_9_2 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_e_v_e_l(const _P_o_s_e_2& pose2, double height) { │ │ │ │ +93 return _P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l(Calibration(), pose2, height); │ │ │ │ 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; │ │ │ │ +95 │ │ │ │ +_1_0_5 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_o_o_k_a_t(const _P_o_i_n_t_3& eye, const _P_o_i_n_t_3& target, │ │ │ │ +106 const _P_o_i_n_t_3& upVector, const Calibration& K = Calibration()) { │ │ │ │ +107 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_B_a_s_e_:_:_L_o_o_k_a_t_P_o_s_e(eye, target, upVector), K); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +110 // Create PinholeCamera, with derivatives │ │ │ │ +111 static _P_i_n_h_o_l_e_C_a_m_e_r_a Create(const _P_o_s_e_3& _p_o_s_e, const Calibration &K, │ │ │ │ +112 _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_,_ _6_> H1 = boost::none, // │ │ │ │ +113 _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_K_> H2 = boost::none) { │ │ │ │ +114 typedef Eigen::Matrix MatrixK6; │ │ │ │ +115 if (H1) │ │ │ │ +116 *H1 << I_6x6, MatrixK6::Zero(); │ │ │ │ +117 typedef Eigen::Matrix Matrix6K; │ │ │ │ +118 typedef Eigen::Matrix MatrixK; │ │ │ │ +119 if (H2) │ │ │ │ +120 *H2 << Matrix6K::Zero(), MatrixK::Identity(); │ │ │ │ +121 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_p_o_s_e,K); │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +127 │ │ │ │ +_1_2_9 explicit _P_i_n_h_o_l_e_C_a_m_e_r_a(const Vector &v) : │ │ │ │ +130 _B_a_s_e(v.head<6>()) { │ │ │ │ +131 if (v.size() > 6) │ │ │ │ +132 K_ = Calibration(v.tail()); │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +_1_3_6 _P_i_n_h_o_l_e_C_a_m_e_r_a(const Vector &v, const Vector &K) : │ │ │ │ +137 _B_a_s_e(v), K_(K) { │ │ │ │ +138 } │ │ │ │ +139 │ │ │ │ +143 │ │ │ │ +_1_4_5 bool _e_q_u_a_l_s(const _B_a_s_e &camera, double tol = 1e-9) const { │ │ │ │ +146 const _P_i_n_h_o_l_e_C_a_m_e_r_a* e = dynamic_cast(&camera); │ │ │ │ +147 return _B_a_s_e_:_:_e_q_u_a_l_s(camera, tol) && K_._e_q_u_a_l_s(e->_c_a_l_i_b_r_a_t_i_o_n(), tol); │ │ │ │ +148 } │ │ │ │ +149 │ │ │ │ +_1_5_1 void _p_r_i_n_t(const std::string& s = "PinholeCamera") const override { │ │ │ │ +152 _B_a_s_e_:_:_p_r_i_n_t(s); │ │ │ │ +153 K_.print(s + ".calibration"); │ │ │ │ +154 } │ │ │ │ +155 │ │ │ │ +159 │ │ │ │ +160 _~_P_i_n_h_o_l_e_C_a_m_e_r_a() override { │ │ │ │ +161 } │ │ │ │ +162 │ │ │ │ +_1_6_4 const _P_o_s_e_3& _p_o_s_e() const { │ │ │ │ +165 return _B_a_s_e_:_:_p_o_s_e(); │ │ │ │ +166 } │ │ │ │ +167 │ │ │ │ +_1_6_9 const _P_o_s_e_3& _g_e_t_P_o_s_e(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _d_i_m_e_n_s_i_o_n_> H) const { │ │ │ │ +170 if (H) { │ │ │ │ +171 H->setZero(); │ │ │ │ +172 H->template block<6, 6>(0, 0) = I_6x6; │ │ │ │ +173 } │ │ │ │ +174 return _B_a_s_e_:_:_p_o_s_e(); │ │ │ │ 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}; │ │ │ │ +176 │ │ │ │ +_1_7_8 const Calibration& _c_a_l_i_b_r_a_t_i_o_n() const override { │ │ │ │ +179 return K_; │ │ │ │ +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) │ │ │ │ +_1_8_7 size_t _d_i_m() const { │ │ │ │ +188 return dimension; │ │ │ │ +189 } │ │ │ │ +190 │ │ │ │ +_1_9_2 static size_t _D_i_m() { │ │ │ │ +193 return dimension; │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +196 typedef Eigen::Matrix VectorK6; │ │ │ │ +197 │ │ │ │ +_1_9_9 _P_i_n_h_o_l_e_C_a_m_e_r_a _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ +200 if ((size_t) d.size() == 6) │ │ │ │ +201 return _P_i_n_h_o_l_e_C_a_m_e_r_a(this->_p_o_s_e()._r_e_t_r_a_c_t(d), _c_a_l_i_b_r_a_t_i_o_n()); │ │ │ │ +202 else │ │ │ │ +203 return _P_i_n_h_o_l_e_C_a_m_e_r_a(this->_p_o_s_e()._r_e_t_r_a_c_t(d.head<6>()), │ │ │ │ +204 _c_a_l_i_b_r_a_t_i_o_n()._r_e_t_r_a_c_t(d.tail(_c_a_l_i_b_r_a_t_i_o_n()._d_i_m()))); │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +_2_0_8 VectorK6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _P_i_n_h_o_l_e_C_a_m_e_r_a& T2) const { │ │ │ │ +209 VectorK6 d; │ │ │ │ +210 d.template head<6>() = this->_p_o_s_e()._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(T2._p_o_s_e()); │ │ │ │ +211 d.template tail() = _c_a_l_i_b_r_a_t_i_o_n().localCoordinates(T2._c_a_l_i_b_r_a_t_i_o_n()); │ │ │ │ +212 return d; │ │ │ │ +213 } │ │ │ │ +214 │ │ │ │ +_2_1_6 static _P_i_n_h_o_l_e_C_a_m_e_r_a _I_d_e_n_t_i_t_y() { │ │ │ │ +217 return _P_i_n_h_o_l_e_C_a_m_e_r_a(); // assumes that the default constructor is valid │ │ │ │ +218 } │ │ │ │ +219 │ │ │ │ +223 │ │ │ │ +224 typedef Eigen::Matrix Matrix2K; │ │ │ │ +225 │ │ │ │ +229 template │ │ │ │ +_2_3_0 _P_o_i_n_t_2 ___p_r_o_j_e_c_t_2(const POINT& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera, │ │ │ │ +231 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<2, _F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_P_O_I_N_T_>_:_:_v_a_l_u_e> _D_p_o_i_n_t) const { │ │ │ │ +232 // We just call 3-derivative version in Base │ │ │ │ +233 if (Dcamera){ │ │ │ │ +234 Matrix26 _D_p_o_s_e; │ │ │ │ +235 Eigen::Matrix Dcal; │ │ │ │ +236 const _P_o_i_n_t_2 pi = _B_a_s_e_:_:_p_r_o_j_e_c_t(pw, _D_p_o_s_e, _D_p_o_i_n_t, Dcal); │ │ │ │ +237 *Dcamera << _D_p_o_s_e, Dcal; │ │ │ │ +238 return pi; │ │ │ │ +239 } else { │ │ │ │ +240 return _B_a_s_e_:_:_p_r_o_j_e_c_t(pw, boost::none, _D_p_o_i_n_t, boost::none); │ │ │ │ +241 } │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +_2_4_5 _P_o_i_n_t_2 _p_r_o_j_e_c_t_2(const _P_o_i_n_t_3& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ +246 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ +247 return ___p_r_o_j_e_c_t_2(pw, Dcamera, _D_p_o_i_n_t); │ │ │ │ +248 } │ │ │ │ +249 │ │ │ │ +_2_5_1 _P_o_i_n_t_2 _p_r_o_j_e_c_t_2(const _U_n_i_t_3& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ +252 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ +253 return ___p_r_o_j_e_c_t_2(pw, Dcamera, _D_p_o_i_n_t); │ │ │ │ +254 } │ │ │ │ +255 │ │ │ │ +_2_6_1 double _r_a_n_g_e(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ +262 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ +263 Matrix16 Dpose_; │ │ │ │ +264 double result = this->_p_o_s_e()._r_a_n_g_e(point, Dcamera ? &Dpose_ : 0, _D_p_o_i_n_t); │ │ │ │ +265 if (Dcamera) │ │ │ │ +266 *Dcamera << Dpose_, Eigen::Matrix::Zero(); │ │ │ │ +267 return result; │ │ │ │ +268 } │ │ │ │ +269 │ │ │ │ +_2_7_5 double _r_a_n_g_e(const _P_o_s_e_3& _p_o_s_e, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ +276 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> _D_p_o_s_e = boost::none) const { │ │ │ │ +277 Matrix16 Dpose_; │ │ │ │ +278 double result = this->_p_o_s_e()._r_a_n_g_e(pose, Dcamera ? &Dpose_ : 0, _D_p_o_s_e); │ │ │ │ +279 if (Dcamera) │ │ │ │ +280 *Dcamera << Dpose_, Eigen::Matrix::Zero(); │ │ │ │ +281 return result; │ │ │ │ +282 } │ │ │ │ +283 │ │ │ │ +289 template │ │ │ │ +_2_9_0 double _r_a_n_g_e(const _P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_a_l_i_b_r_a_t_i_o_n_B_>& camera, │ │ │ │ +291 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = boost::none, │ │ │ │ +292 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_ _+_ _C_a_l_i_b_r_a_t_i_o_n_B_:_:_d_i_m_e_n_s_i_o_n_> Dother = boost::none) │ │ │ │ +const { │ │ │ │ +293 Matrix16 Dcamera_, Dother_; │ │ │ │ +294 double result = this->_p_o_s_e()._r_a_n_g_e(camera._p_o_s_e(), Dcamera ? &Dcamera_ : 0, │ │ │ │ +295 Dother ? &Dother_ : 0); │ │ │ │ +296 if (Dcamera) { │ │ │ │ +297 *Dcamera << Dcamera_, Eigen::Matrix::Zero(); │ │ │ │ +298 } │ │ │ │ +299 if (Dother) { │ │ │ │ +300 Dother->setZero(); │ │ │ │ +301 Dother->template block<1, 6>(0, 0) = Dother_; │ │ │ │ +302 } │ │ │ │ +303 return result; │ │ │ │ +304 } │ │ │ │ +305 │ │ │ │ +_3_1_1 double _r_a_n_g_e(const _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a& camera, │ │ │ │ +312 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = boost::none, │ │ │ │ +313 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Dother = boost::none) const { │ │ │ │ +314 return _r_a_n_g_e(camera._p_o_s_e(), Dcamera, Dother); │ │ │ │ +315 } │ │ │ │ +316 │ │ │ │ +_3_1_8 Matrix34 _c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x() const { │ │ │ │ +319 return K_.K() * _P_i_n_h_o_l_e_B_a_s_e_:_:_p_o_s_e()._i_n_v_e_r_s_e()._m_a_t_r_i_x().block(0, 0, 3, 4); │ │ │ │ +320 } │ │ │ │ +321 │ │ │ │ +_3_2_3 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 { │ │ │ │ +324 return Eigen::Matrix::dimension,1>::Constant(2.0 * │ │ │ │ +K_.fx());; │ │ │ │ +325 } │ │ │ │ +326 │ │ │ │ +327private: │ │ │ │ +328 │ │ │ │ +_3_3_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; │ │ │ │ +331 template │ │ │ │ +332 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +333 ar │ │ │ │ +334 & boost::serialization::make_nvp("PinholeBaseK", │ │ │ │ +335 boost::serialization::base_object(*this)); │ │ │ │ +336 ar & BOOST_SERIALIZATION_NVP(K_); │ │ │ │ +337 } │ │ │ │ +338 │ │ │ │ +339public: │ │ │ │ +340 _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 │ │ │ │ +341}; │ │ │ │ +342 │ │ │ │ +343// manifold traits │ │ │ │ +344 │ │ │ │ +345template │ │ │ │ +_3_4_6struct _t_r_a_i_t_s<_P_i_n_h_o_l_e_C_a_m_e_r_a > │ │ │ │ +347 : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d > {}; │ │ │ │ +348 │ │ │ │ +349template │ │ │ │ +_3_5_0struct _t_r_a_i_t_s > │ │ │ │ +351 : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d > {}; │ │ │ │ +352 │ │ │ │ +353// range traits, used in RangeFactor │ │ │ │ +354template │ │ │ │ +_3_5_5struct _R_a_n_g_e<_P_i_n_h_o_l_e_C_a_m_e_r_a, T> : │ │ │ │ +_H_a_s_R_a_n_g_e, T, double> {}; │ │ │ │ +356 │ │ │ │ +357} // \ gtsam │ │ │ │ +_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 │ │ │ │ +_B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ +Bearing-Range product. │ │ │ │ +_P_i_n_h_o_l_e_P_o_s_e_._h │ │ │ │ +Pinhole camera with known calibration. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ +_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_:_:_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_:_:_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_:_:_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_:_:_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_<_ _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_:_:_R_a_n_g_e │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ +_g_t_s_a_m_:_:_H_a_s_R_a_n_g_e │ │ │ │ +DDeeffiinniittiioonn BearingRange.h:194 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_D_p_o_s_e │ │ │ │ +static Matrix26 Dpose(const Point2 &pn, double d) │ │ │ │ +Calculate Jacobian with respect to pose. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:27 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_p_r_i_n_t │ │ │ │ +virtual void print(const std::string &s="PinholeBase") const │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:74 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_p_o_s_e │ │ │ │ +const Pose3 & pose() const │ │ │ │ +return pose, constant version │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:152 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_L_e_v_e_l_P_o_s_e │ │ │ │ +static Pose3 LevelPose(const Pose2 &pose2, double height) │ │ │ │ +Create a level pose at the given 2D pose and height. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:49 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const PinholeBase &camera, double tol=1e-9) const │ │ │ │ +assert equality up to a tolerance │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:69 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_D_p_o_i_n_t │ │ │ │ +static Matrix23 Dpoint(const Point2 &pn, double d, const Matrix3 &Rt) │ │ │ │ +Calculate Jacobian with respect to point. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:37 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_L_o_o_k_a_t_P_o_s_e │ │ │ │ +static Pose3 LookatPose(const Point3 &eye, const Point3 &target, const Point3 │ │ │ │ +&upVector) │ │ │ │ +Create a camera pose at the given eye position looking at a target point in the │ │ │ │ +scene with the specif... │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.cpp:58 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +A Calibrated camera class [R|-R't], calibration K=I. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:247 │ │ │ │ +_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_C_a_m_e_r_a_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="PinholeCamera") const override │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:151 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:___p_r_o_j_e_c_t_2 │ │ │ │ +Point2 _project2(const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, │ │ │ │ +OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const │ │ │ │ +Templated projection of a 3D point or a point at infinity into the image. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:230 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_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 PinholeCamera.h:323 │ │ │ │ +_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 │ │ │ │ +const Calibration & calibration() const override │ │ │ │ +return calibration │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:178 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_g_e_t_P_o_s_e │ │ │ │ +const Pose3 & getPose(OptionalJacobian< 6, dimension > H) const │ │ │ │ +return pose, with derivative │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:169 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_r_o_j_e_c_t_2 │ │ │ │ +Point2 project2(const Point3 &pw, OptionalJacobian< 2, dimension > │ │ │ │ +Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const │ │ │ │ +project a 3D point from world coordinates into the image │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:245 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +PinholeCamera(const Pose3 &pose) │ │ │ │ +constructor with pose │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:66 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l │ │ │ │ +static PinholeCamera Level(const Pose2 &pose2, double height) │ │ │ │ +PinholeCamera::level with default calibration. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:92 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +PinholeCamera(const Pose3 &pose, const Calibration &K) │ │ │ │ +constructor with pose and calibration │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:71 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l │ │ │ │ +static PinholeCamera Level(const Calibration &K, const Pose2 &pose2, double │ │ │ │ +height) │ │ │ │ +Create a level camera at the given 2D pose and height. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:86 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ +size_t dim() const │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:187 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_I_d_e_n_t_i_t_y │ │ │ │ +static PinholeCamera Identity() │ │ │ │ +for Canonical │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:216 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:192 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const Base &camera, double tol=1e-9) const │ │ │ │ +assert equality up to a tolerance │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:145 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const Pose3 &pose, OptionalJacobian< 1, dimension > │ │ │ │ +Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const │ │ │ │ +Calculate range to another pose. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:275 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, │ │ │ │ +dimension > Dcamera=boost::none, OptionalJacobian< 1, 6+CalibrationB::dimension │ │ │ │ +> Dother=boost::none) const │ │ │ │ +Calculate range to another camera. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:290 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +PinholeCamera(const Vector &v, const Vector &K) │ │ │ │ +Init from Vector and calibration. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:136 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_o_o_k_a_t │ │ │ │ +static PinholeCamera Lookat(const Point3 &eye, const Point3 &target, const │ │ │ │ +Point3 &upVector, const Calibration &K=Calibration()) │ │ │ │ +Create a camera at the given eye position looking at a target point in the │ │ │ │ +scene with the specified u... │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:105 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x │ │ │ │ +Matrix34 cameraProjectionMatrix() const │ │ │ │ +for Linear Triangulation │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:318 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +VectorK6 localCoordinates(const PinholeCamera &T2) const │ │ │ │ +return canonical coordinate │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:208 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_e_t_r_a_c_t │ │ │ │ +PinholeCamera retract(const Vector &d) const │ │ │ │ +move a cameras according to d │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:199 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:330 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_r_o_j_e_c_t_2 │ │ │ │ +Point2 project2(const Unit3 &pw, OptionalJacobian< 2, dimension > │ │ │ │ +Dcamera=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const │ │ │ │ +project a point at infinity from world coordinates into the image │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:251 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_o_s_e │ │ │ │ +const Pose3 & pose() const │ │ │ │ +return pose │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:164 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +PinholeCamera(const Vector &v) │ │ │ │ +Init from vector, can be 6D (default calibration) or dim. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:129 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ +PinholeCamera() │ │ │ │ +default constructor │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:62 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_M_e_a_s_u_r_e_m_e_n_t │ │ │ │ +Point2 Measurement │ │ │ │ +Some classes template on either PinholeCamera or StereoCamera, and this typedef │ │ │ │ +informs those classes... │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:41 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const CalibratedCamera &camera, OptionalJacobian< 1, dimension > │ │ │ │ +Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const │ │ │ │ +Calculate range to a calibrated camera. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:311 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const Point3 &point, OptionalJacobian< 1, dimension > │ │ │ │ +Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const │ │ │ │ +Calculate range to a landmark. │ │ │ │ +DDeeffiinniittiioonn PinholeCamera.h:261 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_K │ │ │ │ +A pinhole camera class that has a Pose3 and a fixed Calibration. │ │ │ │ +DDeeffiinniittiioonn PinholePose.h:34 │ │ │ │ +_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_ _>_:_:_p_r_o_j_e_c_t │ │ │ │ +Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, │ │ │ │ +OptionalJacobian< 2, 3 > Dpoint=boost::none, OptionalJacobian< 2, DimK > │ │ │ │ +Dcal=boost::none) const │ │ │ │ +project a 3D point from world coordinates into the image │ │ │ │ +DDeeffiinniittiioonn PinholePose.h:118 │ │ │ │ +_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_:_:_P_o_s_e_3_:_:_r_a_n_g_e │ │ │ │ +double range(const Point3 &point, OptionalJacobian< 1, 6 > Hself=boost::none, │ │ │ │ +OptionalJacobian< 1, 3 > Hpoint=boost::none) const │ │ │ │ +Calculate range to a landmark. │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:399 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_m_a_t_r_i_x │ │ │ │ +Matrix4 matrix() const │ │ │ │ +convert to 4*4 matrix │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:323 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_i_n_v_e_r_s_e │ │ │ │ +Pose3 inverse() const │ │ │ │ +inverse transformation with derivatives │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:49 │ │ │ │ +_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 │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _Q_u_a_t_e_r_n_i_o_n_._h │ │ │ │ + * _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/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/Rot3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,76 +94,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
Pose3.h File Reference
│ │ │ +
Rot3.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

3D Pose │ │ │ +

Rotation, common code between Rotation matrix and Quaternion. │ │ │ 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:
 
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

│ │ │ -

3D Pose

│ │ │ +

Rotation, common code between Rotation matrix and Quaternion.

│ │ │ +
Author
Alireza Fathi
│ │ │ +
│ │ │ +Christian Potthast
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +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 | _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 │ │ │ │ +Rot3.cpp File Reference │ │ │ │ +Rotation, common code between Rotation matrix and Quaternion. _M_o_r_e_._._. │ │ │ │ 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: │ │ │ │ +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 ********** │ │ │ │ -3D Pose │ │ │ │ +Rotation, common code between Rotation matrix and Quaternion. │ │ │ │ + Author │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ + Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_3_._h │ │ │ │ + * _R_o_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/a00365.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,9 +1,3 @@ │ │ │ │ var a00365 = [ │ │ │ │ - ["gtsam::Pose3::ChartAtOrigin", "a03184.html", null], │ │ │ │ - ["gtsam::traits< Pose3 >", "a03188.html", null], │ │ │ │ - ["gtsam::traits< const Pose3 >", "a03192.html", null], │ │ │ │ - ["gtsam::Bearing< Pose3, Point3 >", "a03196.html", null], │ │ │ │ - ["gtsam::Bearing< Pose3, Pose3 >", "a03200.html", null], │ │ │ │ - ["gtsam::Range< Pose3, T >", "a03204.html", null], │ │ │ │ - ["wedge< Pose3 >", "a00365.html#aefb606eb24889c0f418acf1515a2c723", null] │ │ │ │ + ["RQ", "a00365.html#a5172b5b6d51bd5348c7e551e1376f60a", null] │ │ │ │ ]; │ │ ├── ./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/CalibratedCamera.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Pose3.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
CalibratedCamera.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

3D Pose │ │ │ +

Calibrated camera for which only pose is unknown. │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ -Functions

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

Detailed Description

│ │ │ -

3D Pose

│ │ │ +

Calibrated camera for which only pose is unknown.

│ │ │ +
Date
Aug 17, 2009
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ 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 │ │ │ │ +CalibratedCamera.cpp File Reference │ │ │ │ +Calibrated camera for which only pose is unknown. _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_3 &pose) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Pose │ │ │ │ +Calibrated camera for which only pose is unknown. │ │ │ │ + Date │ │ │ │ + Aug 17, 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 │ │ │ │ + * _C_a_l_i_b_r_a_t_e_d_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/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/EssentialMatrix.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,337 +98,248 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Pose2.h
│ │ │ +
EssentialMatrix.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 {
│ │ │ -
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_;
│ │ │ -
48
│ │ │ -
49public:
│ │ │ -
50
│ │ │ -
53
│ │ │ -
│ │ │ - │ │ │ -
56 r_(traits<Rot2>::Identity()), t_(traits<Point2>::Identity()) {
│ │ │ -
57 }
│ │ │ +
1/*
│ │ │ +
2 * @file EssentialMatrix.h
│ │ │ +
3 * @brief EssentialMatrix class
│ │ │ +
4 * @author Frank Dellaert
│ │ │ +
5 * @date December 17, 2013
│ │ │ +
6 */
│ │ │ +
7
│ │ │ +
8#pragma once
│ │ │ +
9
│ │ │ + │ │ │ +
11#include <gtsam/geometry/Unit3.h>
│ │ │ + │ │ │ +
13#include <gtsam/base/Manifold.h>
│ │ │ +
14
│ │ │ +
15#include <iosfwd>
│ │ │ +
16#include <string>
│ │ │ +
17
│ │ │ +
18namespace gtsam {
│ │ │ +
19
│ │ │ +
│ │ │ + │ │ │ +
27 private:
│ │ │ +
28 Rot3 R_;
│ │ │ +
29 Unit3 t_;
│ │ │ +
30 Matrix3 E_;
│ │ │ +
31
│ │ │ +
32 public:
│ │ │ +
│ │ │ +
34 static Vector3 Homogeneous(const Point2& p) {
│ │ │ +
35 return Vector3(p.x(), p.y(), 1);
│ │ │ +
36 }
│ │ │
│ │ │ +
37
│ │ │ +
40
│ │ │ +
│ │ │ +
42 EssentialMatrix() :E_(t_.skew()) {
│ │ │ +
43 }
│ │ │ +
│ │ │ +
44
│ │ │ +
│ │ │ +
46 EssentialMatrix(const Rot3& aRb, const Unit3& aTb) :
│ │ │ +
47 R_(aRb), t_(aTb), E_(t_.skew() * R_.matrix()) {
│ │ │ +
48 }
│ │ │ +
│ │ │ +
49
│ │ │ +
51 GTSAM_EXPORT static EssentialMatrix FromRotationAndDirection(const Rot3& aRb, const Unit3& aTb,
│ │ │ +
52 OptionalJacobian<5, 3> H1 = boost::none,
│ │ │ +
53 OptionalJacobian<5, 2> H2 = boost::none);
│ │ │ +
54
│ │ │ +
56 GTSAM_EXPORT static EssentialMatrix FromPose3(const Pose3& _1P2_,
│ │ │ +
57 OptionalJacobian<5, 6> H = boost::none);
│ │ │
58
│ │ │ -
60 Pose2(const Pose2& pose) : r_(pose.r_), t_(pose.t_) {}
│ │ │ -
61
│ │ │ -
│ │ │ -
68 Pose2(double x, double y, double theta) :
│ │ │ -
69 r_(Rot2::fromAngle(theta)), t_(x, y) {
│ │ │ -
70 }
│ │ │ -
│ │ │ +
60 template<typename Engine>
│ │ │ +
│ │ │ +
61 static EssentialMatrix Random(Engine & rng) {
│ │ │ + │ │ │ +
63 }
│ │ │ +
│ │ │ +
64
│ │ │ +
65 virtual ~EssentialMatrix() {}
│ │ │ +
66
│ │ │ +
68
│ │ │
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 }
│ │ │ -
│ │ │ -
94
│ │ │ -
102 static boost::optional<Pose2> Align(const Point2Pairs& abPointPairs);
│ │ │ -
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;
│ │ │ +
73 GTSAM_EXPORT void print(const std::string& s = "") const;
│ │ │ +
74
│ │ │ +
│ │ │ +
76 bool equals(const EssentialMatrix& other, double tol = 1e-8) const {
│ │ │ +
77 return R_.equals(other.R_, tol)
│ │ │ +
78 && t_.equals(other.t_, tol);
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
82
│ │ │ +
85 enum { dimension = 5 };
│ │ │ +
86 inline static size_t Dim() { return dimension;}
│ │ │ +
87 inline size_t dim() const { return dimension;}
│ │ │ +
88
│ │ │ +
89 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ +
90
│ │ │ +
│ │ │ +
92 EssentialMatrix retract(const Vector5& xi) const {
│ │ │ +
93 return EssentialMatrix(R_.retract(xi.head<3>()), t_.retract(xi.tail<2>()));
│ │ │ +
94 }
│ │ │ +
│ │ │ +
95
│ │ │ +
│ │ │ +
97 Vector5 localCoordinates(const EssentialMatrix& other) const {
│ │ │ +
98 auto v1 = R_.localCoordinates(other.R_);
│ │ │ +
99 auto v2 = t_.localCoordinates(other.t_);
│ │ │ +
100 Vector5 v;
│ │ │ +
101 v << v1, v2;
│ │ │ +
102 return v;
│ │ │ +
103 }
│ │ │ +
│ │ │ +
105
│ │ │ +
108
│ │ │ +
│ │ │ +
110 inline const Rot3& rotation() const {
│ │ │ +
111 return R_;
│ │ │ +
112 }
│ │ │ +
│ │ │
113
│ │ │ -
115 GTSAM_EXPORT bool equals(const Pose2& pose, double tol = 1e-9) const;
│ │ │ -
116
│ │ │ -
120
│ │ │ -
122 inline static Pose2 Identity() { return Pose2(); }
│ │ │ -
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;
│ │ │ -
147
│ │ │ -
│ │ │ -
149 inline Vector3 Adjoint(const Vector3& xi) const {
│ │ │ -
150 return AdjointMap()*xi;
│ │ │ -
151 }
│ │ │ +
│ │ │ +
115 inline const Unit3& direction() const {
│ │ │ +
116 return t_;
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │ +
│ │ │ +
120 inline const Matrix3& matrix() const {
│ │ │ +
121 return E_;
│ │ │ +
122 }
│ │ │
│ │ │ +
123
│ │ │ +
│ │ │ +
125 inline const Unit3& epipole_a() const {
│ │ │ +
126 return t_;
│ │ │ +
127 }
│ │ │ +
│ │ │ +
128
│ │ │ +
│ │ │ +
130 inline Unit3 epipole_b() const {
│ │ │ +
131 return R_.unrotate(t_);
│ │ │ +
132 }
│ │ │ +
│ │ │ +
133
│ │ │ +
141 GTSAM_EXPORT Point3 transformTo(const Point3& p,
│ │ │ +
142 OptionalJacobian<3, 5> DE = boost::none,
│ │ │ +
143 OptionalJacobian<3, 3> Dpoint = boost::none) const;
│ │ │ +
144
│ │ │ +
150 GTSAM_EXPORT EssentialMatrix rotate(const Rot3& cRb, OptionalJacobian<5, 5> HE =
│ │ │ +
151 boost::none, OptionalJacobian<5, 3> HR = boost::none) const;
│ │ │
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 }
│ │ │ -
│ │ │ -
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 };
│ │ │ -
│ │ │ +
│ │ │ +
158 friend EssentialMatrix operator*(const Rot3& cRb, const EssentialMatrix& E) {
│ │ │ +
159 return E.rotate(cRb);
│ │ │ +
160 }
│ │ │ +
│ │ │ +
161
│ │ │ +
163 GTSAM_EXPORT double error(const Vector3& vA, const Vector3& vB,
│ │ │ +
164 OptionalJacobian<1, 5> H = boost::none) const;
│ │ │ +
165
│ │ │ +
167
│ │ │ +
170
│ │ │ +
172 GTSAM_EXPORT friend std::ostream& operator <<(std::ostream& os, const EssentialMatrix& E);
│ │ │ +
173
│ │ │ +
175 GTSAM_EXPORT friend std::istream& operator >>(std::istream& is, EssentialMatrix& E);
│ │ │ +
176
│ │ │ +
178
│ │ │ +
179 private:
│ │ │ +
182
│ │ │ + │ │ │ +
185 template<class ARCHIVE>
│ │ │ +
186 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
187 ar & BOOST_SERIALIZATION_NVP(R_);
│ │ │ +
188 ar & BOOST_SERIALIZATION_NVP(t_);
│ │ │ +
189
│ │ │ +
190 ar & boost::serialization::make_nvp("E11", E_(0, 0));
│ │ │ +
191 ar & boost::serialization::make_nvp("E12", E_(0, 1));
│ │ │ +
192 ar & boost::serialization::make_nvp("E13", E_(0, 2));
│ │ │ +
193 ar & boost::serialization::make_nvp("E21", E_(1, 0));
│ │ │ +
194 ar & boost::serialization::make_nvp("E22", E_(1, 1));
│ │ │ +
195 ar & boost::serialization::make_nvp("E23", E_(1, 2));
│ │ │ +
196 ar & boost::serialization::make_nvp("E31", E_(2, 0));
│ │ │ +
197 ar & boost::serialization::make_nvp("E32", E_(2, 1));
│ │ │ +
198 ar & boost::serialization::make_nvp("E33", E_(2, 2));
│ │ │ +
199 }
│ │ │ +
200
│ │ │
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.
│ │ │ +
203 public:
│ │ │ + │ │ │ +
205};
│ │ │ +
│ │ │ +
206
│ │ │ +
207template<>
│ │ │ +
208struct traits<EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
│ │ │ +
209
│ │ │ +
210template<>
│ │ │ +
211struct traits<const EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
│ │ │ +
212
│ │ │ +
213} // namespace gtsam
│ │ │ +
214
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
3D Pose
│ │ │ +
2D Point
│ │ │
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
│ │ │
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
│ │ │ +
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
Definition Lie.h:131
│ │ │ +
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
│ │ │ +
An essential matrix is like a Pose3, except with translation up to scale It is named after the 3*3 ma...
Definition EssentialMatrix.h:26
│ │ │ +
friend EssentialMatrix operator*(const Rot3 &cRb, const EssentialMatrix &E)
Given essential matrix E in camera frame B, convert to body frame C.
Definition EssentialMatrix.h:158
│ │ │ +
const Rot3 & rotation() const
Rotation.
Definition EssentialMatrix.h:110
│ │ │ +
Vector5 localCoordinates(const EssentialMatrix &other) const
Compute the coordinates in the tangent space.
Definition EssentialMatrix.h:97
│ │ │ +
bool equals(const EssentialMatrix &other, double tol=1e-8) const
assert equality up to a tolerance
Definition EssentialMatrix.h:76
│ │ │ +
EssentialMatrix()
Default constructor.
Definition EssentialMatrix.h:42
│ │ │ +
static GTSAM_EXPORT EssentialMatrix FromPose3(const Pose3 &_1P2_, OptionalJacobian< 5, 6 > H=boost::none)
Named constructor converting a Pose3 with scale to EssentialMatrix (no scale)
Definition EssentialMatrix.cpp:27
│ │ │ +
GTSAM_EXPORT friend std::istream & operator>>(std::istream &is, EssentialMatrix &E)
stream from stream
Definition EssentialMatrix.cpp:126
│ │ │ +
static EssentialMatrix Random(Engine &rng)
Random, using Rot3::Random and Unit3::Random.
Definition EssentialMatrix.h:61
│ │ │ +
static GTSAM_EXPORT EssentialMatrix FromRotationAndDirection(const Rot3 &aRb, const Unit3 &aTb, OptionalJacobian< 5, 3 > H1=boost::none, OptionalJacobian< 5, 2 > H2=boost::none)
Named constructor with derivatives.
Definition EssentialMatrix.cpp:16
│ │ │ +
GTSAM_EXPORT double error(const Vector3 &vA, const Vector3 &vB, OptionalJacobian< 1, 5 > H=boost::none) const
epipolar error, algebraic
Definition EssentialMatrix.cpp:104
│ │ │ +
EssentialMatrix retract(const Vector5 &xi) const
Retract delta to manifold.
Definition EssentialMatrix.h:92
│ │ │ +
EssentialMatrix(const Rot3 &aRb, const Unit3 &aTb)
Construct from rotation and translation.
Definition EssentialMatrix.h:46
│ │ │ +
GTSAM_EXPORT void print(const std::string &s="") const
print with optional string
Definition EssentialMatrix.cpp:48
│ │ │ +
static Vector3 Homogeneous(const Point2 &p)
Static function to convert Point2 to homogeneous coordinates.
Definition EssentialMatrix.h:34
│ │ │ +
const Unit3 & epipole_a() const
Return epipole in image_a , as Unit3 to allow for infinity.
Definition EssentialMatrix.h:125
│ │ │ +
const Unit3 & direction() const
Direction.
Definition EssentialMatrix.h:115
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition EssentialMatrix.h:184
│ │ │ +
GTSAM_EXPORT Point3 transformTo(const Point3 &p, OptionalJacobian< 3, 5 > DE=boost::none, OptionalJacobian< 3, 3 > Dpoint=boost::none) const
takes point in world coordinates and transforms it to pose with |t|==1
Definition EssentialMatrix.cpp:55
│ │ │ +
Unit3 epipole_b() const
Return epipole in image_b, as Unit3 to allow for infinity.
Definition EssentialMatrix.h:130
│ │ │ +
GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const EssentialMatrix &E)
stream to stream
Definition EssentialMatrix.cpp:117
│ │ │ +
const Matrix3 & matrix() const
Return 3*3 matrix representation.
Definition EssentialMatrix.h:120
│ │ │ +
GTSAM_EXPORT EssentialMatrix rotate(const Rot3 &cRb, OptionalJacobian< 5, 5 > HE=boost::none, OptionalJacobian< 5, 3 > HR=boost::none) const
Given essential matrix E in camera frame B, convert to body frame C.
Definition EssentialMatrix.cpp:73
│ │ │ +
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
│ │ │ +
bool equals(const Rot3 &p, double tol=1e-9) const
equals with an tolerance
Definition Rot3.cpp:100
│ │ │ +
Point3 unrotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
rotate point from world to rotated frame
Definition Rot3.cpp:136
│ │ │ +
static Rot3 Random(std::mt19937 &rng)
Random, generates a random axis, then random angle [-pi,pi] Example: std::mt19937 engine(42); Unit3 ...
Definition Rot3.cpp:40
│ │ │ +
Represents a 3D point on a unit sphere.
Definition Unit3.h:43
│ │ │ +
Unit3 retract(const Vector2 &v, OptionalJacobian< 2, 2 > H=boost::none) const
The retract function.
Definition Unit3.cpp:255
│ │ │ +
bool equals(const Unit3 &s, double tol=1e-9) const
The equals function with tolerance.
Definition Unit3.h:115
│ │ │ +
static Unit3 Random(std::mt19937 &rng)
Random direction, using boost::uniform_on_sphere Example: std::mt19937 engine(42); Unit3 unit = Unit3...
Definition Unit3.cpp:55
│ │ │ +
Vector2 localCoordinates(const Unit3 &s) const
The local coordinates function.
Definition Unit3.cpp:285
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,472 +1,355 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Pose2.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) │ │ │ │ +EssentialMatrix.h │ │ │ │ +1/* │ │ │ │ +2 * @file EssentialMatrix.h │ │ │ │ +3 * @brief EssentialMatrix class │ │ │ │ +4 * @author Frank Dellaert │ │ │ │ +5 * @date December 17, 2013 │ │ │ │ +6 */ │ │ │ │ 7 │ │ │ │ -8 * See LICENSE for the license information │ │ │ │ +8#pragma once │ │ │ │ 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 { │ │ │ │ -30 │ │ │ │ -_3_6class _P_o_s_e_2: public _L_i_e_G_r_o_u_p { │ │ │ │ +10#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ +11#include │ │ │ │ +12#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ +13#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18namespace _g_t_s_a_m { │ │ │ │ +19 │ │ │ │ +_2_6class _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x { │ │ │ │ +27 private: │ │ │ │ +28 _R_o_t_3 R_; │ │ │ │ +29 _U_n_i_t_3 t_; │ │ │ │ +30 Matrix3 E_; │ │ │ │ +31 │ │ │ │ +32 public: │ │ │ │ +_3_4 static Vector3 _H_o_m_o_g_e_n_e_o_u_s(const _P_o_i_n_t_2& p) { │ │ │ │ +35 return Vector3(p.x(), p.y(), 1); │ │ │ │ +36 } │ │ │ │ 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_; │ │ │ │ -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 } │ │ │ │ +40 │ │ │ │ +_4_2 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x() :E_(t_.skew()) { │ │ │ │ +43 } │ │ │ │ +44 │ │ │ │ +_4_6 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(const _R_o_t_3& aRb, const _U_n_i_t_3& aTb) : │ │ │ │ +47 R_(aRb), t_(aTb), E_(t_.skew() * R_._m_a_t_r_i_x()) { │ │ │ │ +48 } │ │ │ │ +49 │ │ │ │ +51 GTSAM_EXPORT static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _F_r_o_m_R_o_t_a_t_i_o_n_A_n_d_D_i_r_e_c_t_i_o_n(const _R_o_t_3& │ │ │ │ +aRb, const _U_n_i_t_3& aTb, │ │ │ │ +52 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _3_> H1 = boost::none, │ │ │ │ +53 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _2_> H2 = boost::none); │ │ │ │ +54 │ │ │ │ +56 GTSAM_EXPORT static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _F_r_o_m_P_o_s_e_3(const _P_o_s_e_3& _1P2_, │ │ │ │ +57 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _6_> H = boost::none); │ │ │ │ 58 │ │ │ │ -_6_0 _P_o_s_e_2(const _P_o_s_e_2& pose) : r_(pose.r_), t_(pose.t_) {} │ │ │ │ -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 } │ │ │ │ +60 template │ │ │ │ +_6_1 static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _R_a_n_d_o_m(Engine & rng) { │ │ │ │ +62 return _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(_R_o_t_3_:_:_R_a_n_d_o_m(rng), _U_n_i_t_3_:_:_R_a_n_d_o_m(rng)); │ │ │ │ +63 } │ │ │ │ +64 │ │ │ │ +65 virtual _~_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x() {} │ │ │ │ +66 │ │ │ │ +68 │ │ │ │ 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); │ │ │ │ -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; │ │ │ │ +73 GTSAM_EXPORT void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ +74 │ │ │ │ +_7_6 bool _e_q_u_a_l_s(const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& other, double tol = 1e-8) const { │ │ │ │ +77 return R_._e_q_u_a_l_s(other.R_, tol) │ │ │ │ +78 && t_._e_q_u_a_l_s(other.t_, tol); │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +82 │ │ │ │ +85 enum { dimension = 5 }; │ │ │ │ +86 inline static size_t Dim() { return dimension;} │ │ │ │ +87 inline size_t dim() const { return dimension;} │ │ │ │ +88 │ │ │ │ +89 typedef OptionalJacobian ChartJacobian; │ │ │ │ +90 │ │ │ │ +_9_2 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _r_e_t_r_a_c_t(const Vector5& xi) const { │ │ │ │ +93 return _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(R_._r_e_t_r_a_c_t(xi.head<3>()), t_._r_e_t_r_a_c_t(xi.tail<2>())); │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +_9_7 Vector5 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& other) const { │ │ │ │ +98 auto v1 = R_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(other.R_); │ │ │ │ +99 auto v2 = t_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(other.t_); │ │ │ │ +100 Vector5 v; │ │ │ │ +101 v << v1, v2; │ │ │ │ +102 return v; │ │ │ │ +103 } │ │ │ │ +105 │ │ │ │ +108 │ │ │ │ +_1_1_0 inline const _R_o_t_3& _r_o_t_a_t_i_o_n() const { │ │ │ │ +111 return R_; │ │ │ │ +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 const _U_n_i_t_3& _d_i_r_e_c_t_i_o_n() const { │ │ │ │ +116 return t_; │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +_1_2_0 inline const Matrix3& _m_a_t_r_i_x() const { │ │ │ │ +121 return E_; │ │ │ │ +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; │ │ │ │ -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 } │ │ │ │ +_1_2_5 inline const _U_n_i_t_3& _e_p_i_p_o_l_e___a() const { │ │ │ │ +126 return t_; │ │ │ │ +127 } │ │ │ │ +128 │ │ │ │ +_1_3_0 inline _U_n_i_t_3 _e_p_i_p_o_l_e___b() const { │ │ │ │ +131 return R_._u_n_r_o_t_a_t_e(t_); │ │ │ │ +132 } │ │ │ │ +133 │ │ │ │ +141 GTSAM_EXPORT _P_o_i_n_t_3 _t_r_a_n_s_f_o_r_m_T_o(const _P_o_i_n_t_3& p, │ │ │ │ +142 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _5_> DE = boost::none, │ │ │ │ +143 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> Dpoint = boost::none) const; │ │ │ │ +144 │ │ │ │ +150 GTSAM_EXPORT _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _r_o_t_a_t_e(const _R_o_t_3& cRb, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _5_> │ │ │ │ +HE = │ │ │ │ +151 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _3_> HR = boost::none) const; │ │ │ │ 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 } │ │ │ │ -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 }; │ │ │ │ +_1_5_8 friend _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _o_p_e_r_a_t_o_r_*(const _R_o_t_3& cRb, const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E) │ │ │ │ +{ │ │ │ │ +159 return E.rotate(cRb); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +163 GTSAM_EXPORT double _e_r_r_o_r(const Vector3& vA, const Vector3& vB, │ │ │ │ +164 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _5_> H = boost::none) const; │ │ │ │ +165 │ │ │ │ +167 │ │ │ │ +170 │ │ │ │ +172 GTSAM_EXPORT friend std::ostream& _o_p_e_r_a_t_o_r_ _<_<(std::ostream& os, const │ │ │ │ +_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E); │ │ │ │ +173 │ │ │ │ +175 GTSAM_EXPORT friend std::istream& _o_p_e_r_a_t_o_r_ _>_>(std::istream& is, │ │ │ │ +_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E); │ │ │ │ +176 │ │ │ │ +178 │ │ │ │ +179 private: │ │ │ │ +182 │ │ │ │ +_1_8_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; │ │ │ │ +185 template │ │ │ │ +186 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +187 ar & BOOST_SERIALIZATION_NVP(R_); │ │ │ │ +188 ar & BOOST_SERIALIZATION_NVP(t_); │ │ │ │ +189 │ │ │ │ +190 ar & boost::serialization::make_nvp("E11", E_(0, 0)); │ │ │ │ +191 ar & boost::serialization::make_nvp("E12", E_(0, 1)); │ │ │ │ +192 ar & boost::serialization::make_nvp("E13", E_(0, 2)); │ │ │ │ +193 ar & boost::serialization::make_nvp("E21", E_(1, 0)); │ │ │ │ +194 ar & boost::serialization::make_nvp("E22", E_(1, 1)); │ │ │ │ +195 ar & boost::serialization::make_nvp("E23", E_(1, 2)); │ │ │ │ +196 ar & boost::serialization::make_nvp("E31", E_(2, 0)); │ │ │ │ +197 ar & boost::serialization::make_nvp("E32", E_(2, 1)); │ │ │ │ +198 ar & boost::serialization::make_nvp("E33", E_(2, 2)); │ │ │ │ +199 } │ │ │ │ +200 │ │ │ │ 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 │ │ │ │ +203 public: │ │ │ │ +204 _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 │ │ │ │ +205}; │ │ │ │ +206 │ │ │ │ +207template<> │ │ │ │ +_2_0_8struct _t_r_a_i_t_s<_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ +{}; │ │ │ │ +209 │ │ │ │ +210template<> │ │ │ │ +_2_1_1struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_M_a_n_i_f_o_l_d {}; │ │ │ │ +212 │ │ │ │ +213} // namespace gtsam │ │ │ │ +214 │ │ │ │ _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 │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ +_P_o_s_e_3_._h │ │ │ │ +3D Pose │ │ │ │ _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. │ │ │ │ _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 │ │ │ │ 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_:_:_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_:_:_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_:_:_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 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ +An essential matrix is like a Pose3, except with translation up to scale It is │ │ │ │ +named after the 3*3 ma... │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:26 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +friend EssentialMatrix operator*(const Rot3 &cRb, const EssentialMatrix &E) │ │ │ │ +Given essential matrix E in camera frame B, convert to body frame C. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:158 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_o_t_a_t_i_o_n │ │ │ │ +const Rot3 & rotation() const │ │ │ │ +Rotation. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:110 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector5 localCoordinates(const EssentialMatrix &other) const │ │ │ │ +Compute the coordinates in the tangent space. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:97 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const EssentialMatrix &other, double tol=1e-8) const │ │ │ │ +assert equality up to a tolerance │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:76 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ +EssentialMatrix() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:42 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_F_r_o_m_P_o_s_e_3 │ │ │ │ +static GTSAM_EXPORT EssentialMatrix FromPose3(const Pose3 &_1P2_, │ │ │ │ +OptionalJacobian< 5, 6 > H=boost::none) │ │ │ │ +Named constructor converting a Pose3 with scale to EssentialMatrix (no scale) │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:27 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_>_> │ │ │ │ +GTSAM_EXPORT friend std::istream & operator>>(std::istream &is, EssentialMatrix │ │ │ │ +&E) │ │ │ │ +stream from stream │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:126 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_R_a_n_d_o_m │ │ │ │ +static EssentialMatrix Random(Engine &rng) │ │ │ │ +Random, using Rot3::Random and Unit3::Random. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:61 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_F_r_o_m_R_o_t_a_t_i_o_n_A_n_d_D_i_r_e_c_t_i_o_n │ │ │ │ +static GTSAM_EXPORT EssentialMatrix FromRotationAndDirection(const Rot3 &aRb, │ │ │ │ +const Unit3 &aTb, OptionalJacobian< 5, 3 > H1=boost::none, OptionalJacobian< 5, │ │ │ │ +2 > H2=boost::none) │ │ │ │ +Named constructor with derivatives. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:16 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_r_r_o_r │ │ │ │ +GTSAM_EXPORT double error(const Vector3 &vA, const Vector3 &vB, │ │ │ │ +OptionalJacobian< 1, 5 > H=boost::none) const │ │ │ │ +epipolar error, algebraic │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:104 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_e_t_r_a_c_t │ │ │ │ +EssentialMatrix retract(const Vector5 &xi) const │ │ │ │ +Retract delta to manifold. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:92 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ +EssentialMatrix(const Rot3 &aRb, const Unit3 &aTb) │ │ │ │ +Construct from rotation and translation. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:46 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_p_r_i_n_t │ │ │ │ GTSAM_EXPORT 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 EssentialMatrix.cpp:48 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_H_o_m_o_g_e_n_e_o_u_s │ │ │ │ +static Vector3 Homogeneous(const Point2 &p) │ │ │ │ +Static function to convert Point2 to homogeneous coordinates. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:34 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_p_i_p_o_l_e___a │ │ │ │ +const Unit3 & epipole_a() const │ │ │ │ +Return epipole in image_a , as Unit3 to allow for infinity. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:125 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_d_i_r_e_c_t_i_o_n │ │ │ │ +const Unit3 & direction() const │ │ │ │ +Direction. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:115 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:184 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_t_r_a_n_s_f_o_r_m_T_o │ │ │ │ +GTSAM_EXPORT Point3 transformTo(const Point3 &p, OptionalJacobian< 3, 5 > │ │ │ │ +DE=boost::none, OptionalJacobian< 3, 3 > Dpoint=boost::none) const │ │ │ │ +takes point in world coordinates and transforms it to pose with |t|==1 │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:55 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_p_i_p_o_l_e___b │ │ │ │ +Unit3 epipole_b() const │ │ │ │ +Return epipole in image_b, as Unit3 to allow for infinity. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:130 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ +GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const │ │ │ │ +EssentialMatrix &E) │ │ │ │ +stream to stream │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:117 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ +const Matrix3 & matrix() const │ │ │ │ +Return 3*3 matrix representation. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.h:120 │ │ │ │ +_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_o_t_a_t_e │ │ │ │ +GTSAM_EXPORT EssentialMatrix rotate(const Rot3 &cRb, OptionalJacobian< 5, 5 > │ │ │ │ +HE=boost::none, OptionalJacobian< 5, 3 > HR=boost::none) const │ │ │ │ +Given essential matrix E in camera frame B, convert to body frame C. │ │ │ │ +DDeeffiinniittiioonn EssentialMatrix.cpp:73 │ │ │ │ +_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_:_:_R_o_t_3_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const Rot3 &p, double tol=1e-9) const │ │ │ │ +equals with an tolerance │ │ │ │ +DDeeffiinniittiioonn Rot3.cpp:100 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_3_:_:_u_n_r_o_t_a_t_e │ │ │ │ +Point3 unrotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, │ │ │ │ +OptionalJacobian< 3, 3 > H2=boost::none) const │ │ │ │ +rotate point from world to rotated frame │ │ │ │ +DDeeffiinniittiioonn Rot3.cpp:136 │ │ │ │ +_g_t_s_a_m_:_:_R_o_t_3_:_:_R_a_n_d_o_m │ │ │ │ +static Rot3 Random(std::mt19937 &rng) │ │ │ │ +Random, generates a random axis, then random angle [-pi,pi] Example: std:: │ │ │ │ +mt19937 engine(42); Unit3 ... │ │ │ │ +DDeeffiinniittiioonn Rot3.cpp:40 │ │ │ │ +_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_:_:_r_e_t_r_a_c_t │ │ │ │ +Unit3 retract(const Vector2 &v, OptionalJacobian< 2, 2 > H=boost::none) const │ │ │ │ +The retract function. │ │ │ │ +DDeeffiinniittiioonn Unit3.cpp:255 │ │ │ │ +_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_:_:_R_a_n_d_o_m │ │ │ │ +static Unit3 Random(std::mt19937 &rng) │ │ │ │ +Random direction, using boost::uniform_on_sphere Example: std::mt19937 engine │ │ │ │ +(42); Unit3 unit = Unit3... │ │ │ │ +DDeeffiinniittiioonn Unit3.cpp:55 │ │ │ │ +_g_t_s_a_m_:_:_U_n_i_t_3_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector2 localCoordinates(const Unit3 &s) const │ │ │ │ +The local coordinates function. │ │ │ │ +DDeeffiinniittiioonn Unit3.cpp:285 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_s_e_2_._h │ │ │ │ + * EEsssseennttiiaallMMaattrriixx..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/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/Cal3_S2Stereo.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,98 +95,47 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
Point3.h File Reference
│ │ │ +Namespaces
│ │ │ +
Cal3_S2Stereo.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

3D Point │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  gtsam::Range< Point3, Point3 >
class  gtsam::Cal3_S2Stereo
 The most common 5DOF 3D->2D calibration, stereo version. More...
 
struct  gtsam::traits< Cal3_S2Stereo >
 
struct  gtsam::traits< const Cal3_S2Stereo >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ 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.
 
│ │ │

Detailed Description

│ │ │ -

3D Point

│ │ │ -
Author
Alireza Fathi
│ │ │ -
│ │ │ -Christian Potthast
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +

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

│ │ │ +
Author
Chris Beall
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,72 +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 | _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_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cal3_S2Stereo.h File Reference │ │ │ │ +The most common 5DOF 3D->2D calibration + Stereo baseline. _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_ _> │ │ │ │ + class   _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. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3___S_2_S_t_e_r_e_o_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3___S_2_S_t_e_r_e_o_ _> │ │ │ │   │ │ │ │ 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 │ │ │ │ -  │ │ │ │ -Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point3 pairs. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -3D Point │ │ │ │ +The most common 5DOF 3D->2D calibration + Stereo baseline. │ │ │ │ Author │ │ │ │ - Alireza Fathi │ │ │ │ - Christian Potthast │ │ │ │ - Frank Dellaert │ │ │ │ + Chris Beall │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_3_._h │ │ │ │ + * _C_a_l_3___S_2_S_t_e_r_e_o_._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/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] │ │ │ │ + ["gtsam::traits< Cal3_S2Stereo >", "a02960.html", null], │ │ │ │ + ["gtsam::traits< const Cal3_S2Stereo >", "a02964.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00377_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2Stereo.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,113 +98,163 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Point3.h
│ │ │ +
Cal3_S2Stereo.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// \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 {
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ +
21#include <iosfwd>
│ │ │ +
22
│ │ │ +
23namespace gtsam {
│ │ │ +
24
│ │ │ +
│ │ │ +
30class GTSAM_EXPORT Cal3_S2Stereo : public Cal3_S2 {
│ │ │ +
31 private:
│ │ │ +
32 double b_ = 1.0f;
│ │ │
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);
│ │ │ +
34 public:
│ │ │ +
35 enum { dimension = 6 };
│ │ │ +
36
│ │ │ +
38 using shared_ptr = boost::shared_ptr<Cal3_S2Stereo>;
│ │ │ +
39
│ │ │
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);
│ │ │ +
44 Cal3_S2Stereo() = default;
│ │ │ +
45
│ │ │ +
│ │ │ +
47 Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
│ │ │ +
48 : Cal3_S2(fx, fy, s, u0, v0), b_(b) {}
│ │ │ +
│ │ │
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
│ │ │ -
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
│ │ │ -
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
│ │ │ -
serialization for Vectors
│ │ │ -
typedef and functions to augment Eigen's VectorXd
│ │ │ +
│ │ │ +
51 Cal3_S2Stereo(const Vector6& d)
│ │ │ +
52 : Cal3_S2(d(0), d(1), d(2), d(3), d(4)), b_(d(5)) {}
│ │ │ +
│ │ │ +
53
│ │ │ +
│ │ │ +
55 Cal3_S2Stereo(double fov, int w, int h, double b)
│ │ │ +
56 : Cal3_S2(fov, w, h), b_(b) {}
│ │ │ +
│ │ │ +
57
│ │ │ +
59
│ │ │ +
67 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 6> Dcal = boost::none,
│ │ │ +
68 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ +
69
│ │ │ +
77 Point2 calibrate(const Point2& p, OptionalJacobian<2, 6> Dcal = boost::none,
│ │ │ +
78 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ +
79
│ │ │ +
85 Vector3 calibrate(const Vector3& p) const { return Cal3_S2::calibrate(p); }
│ │ │ +
86
│ │ │ +
89
│ │ │ +
91 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ +
92 const Cal3_S2Stereo& cal);
│ │ │ +
93
│ │ │ +
95 void print(const std::string& s = "") const override;
│ │ │ +
96
│ │ │ +
98 bool equals(const Cal3_S2Stereo& other, double tol = 10e-9) const;
│ │ │ +
99
│ │ │ +
103
│ │ │ +
105 const Cal3_S2& calibration() const { return *this; }
│ │ │ +
106
│ │ │ +
108 Matrix3 K() const override { return Cal3_S2::K(); }
│ │ │ +
109
│ │ │ +
111 inline double baseline() const { return b_; }
│ │ │ +
112
│ │ │ +
│ │ │ +
114 Vector6 vector() const {
│ │ │ +
115 Vector6 v;
│ │ │ +
116 v << Cal3_S2::vector(), b_;
│ │ │ +
117 return v;
│ │ │ +
118 }
│ │ │ +
│ │ │ +
119
│ │ │ +
123
│ │ │ +
125 inline size_t dim() const override { return Dim(); }
│ │ │ +
126
│ │ │ +
128 inline static size_t Dim() { return dimension; }
│ │ │ +
129
│ │ │ +
│ │ │ +
131 inline Cal3_S2Stereo retract(const Vector& d) const {
│ │ │ +
132 return Cal3_S2Stereo(fx() + d(0), fy() + d(1), skew() + d(2), px() + d(3),
│ │ │ +
133 py() + d(4), b_ + d(5));
│ │ │ +
134 }
│ │ │ +
│ │ │ +
135
│ │ │ +
│ │ │ +
137 Vector6 localCoordinates(const Cal3_S2Stereo& T2) const {
│ │ │ +
138 return T2.vector() - vector();
│ │ │ +
139 }
│ │ │ +
│ │ │ +
140
│ │ │ +
144
│ │ │ +
145 private:
│ │ │ +
147 friend class boost::serialization::access;
│ │ │ +
148 template <class Archive>
│ │ │ +
149 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ +
150 ar& boost::serialization::make_nvp(
│ │ │ +
151 "Cal3_S2", boost::serialization::base_object<Cal3_S2>(*this));
│ │ │ +
152 ar& BOOST_SERIALIZATION_NVP(b_);
│ │ │ +
153 }
│ │ │ +
155};
│ │ │ +
│ │ │ +
156
│ │ │ +
157// Define GTSAM traits
│ │ │ +
158template <>
│ │ │ +
159struct traits<Cal3_S2Stereo> : public internal::Manifold<Cal3_S2Stereo> {};
│ │ │ +
160
│ │ │ +
161template <>
│ │ │ +
│ │ │ +
162struct traits<const Cal3_S2Stereo> : public internal::Manifold<Cal3_S2Stereo> {
│ │ │ +
163};
│ │ │ +
│ │ │ +
164
│ │ │ +
165} // \ namespace gtsam
│ │ │ +
The most common 5DOF 3D->2D calibration.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
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
│ │ │ +
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
│ │ │ +
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
│ │ │ -
Definition BearingRange.h:40
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
The most common 5DOF 3D->2D calibration.
Definition Cal3_S2.h:34
│ │ │ +
The most common 5DOF 3D->2D calibration, stereo version.
Definition Cal3_S2Stereo.h:30
│ │ │ +
Vector6 vector() const
vectorized form (column-wise)
Definition Cal3_S2Stereo.h:114
│ │ │ +
Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
constructor from doubles
Definition Cal3_S2Stereo.h:47
│ │ │ +
Vector6 localCoordinates(const Cal3_S2Stereo &T2) const
Unretraction for the calibration.
Definition Cal3_S2Stereo.h:137
│ │ │ +
const Cal3_S2 & calibration() const
return calibration, same for left and right
Definition Cal3_S2Stereo.h:105
│ │ │ +
size_t dim() const override
return DOF, dimensionality of tangent space
Definition Cal3_S2Stereo.h:125
│ │ │ +
Vector3 calibrate(const Vector3 &p) const
Convert homogeneous image coordinates to intrinsic coordinates.
Definition Cal3_S2Stereo.h:85
│ │ │ +
Cal3_S2Stereo retract(const Vector &d) const
Given 6-dim tangent vector, create new calibration.
Definition Cal3_S2Stereo.h:131
│ │ │ +
Matrix3 K() const override
return calibration matrix K, same for left and right
Definition Cal3_S2Stereo.h:108
│ │ │ +
static size_t Dim()
return DOF, dimensionality of tangent space
Definition Cal3_S2Stereo.h:128
│ │ │ +
Cal3_S2Stereo(double fov, int w, int h, double b)
easy constructor; field-of-view in degrees, assumes zero skew
Definition Cal3_S2Stereo.h:55
│ │ │ +
double baseline() const
return baseline
Definition Cal3_S2Stereo.h:111
│ │ │ +
Cal3_S2Stereo(const Vector6 &d)
constructor from vector
Definition Cal3_S2Stereo.h:51
│ │ │ +
Cal3_S2Stereo()=default
default calibration leaves coordinates unchanged
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,140 +1,204 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Point3.h │ │ │ │ +Cal3_S2Stereo.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// \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 { │ │ │ │ +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_._h> │ │ │ │ +21#include │ │ │ │ +22 │ │ │ │ +23namespace _g_t_s_a_m { │ │ │ │ +24 │ │ │ │ +_3_0class GTSAM_EXPORT _C_a_l_3___S_2_S_t_e_r_e_o : public _C_a_l_3___S_2 { │ │ │ │ +31 private: │ │ │ │ +32 double b_ = 1.0f; │ │ │ │ 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); │ │ │ │ +34 public: │ │ │ │ +35 enum { dimension = 6 }; │ │ │ │ +36 │ │ │ │ +38 using shared_ptr = boost::shared_ptr; │ │ │ │ +39 │ │ │ │ 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); │ │ │ │ +_4_4 _C_a_l_3___S_2_S_t_e_r_e_o() = default; │ │ │ │ +45 │ │ │ │ +_4_7 _C_a_l_3___S_2_S_t_e_r_e_o(double fx, double fy, double s, double u0, double v0, double │ │ │ │ +b) │ │ │ │ +48 : _C_a_l_3___S_2(fx, fy, s, u0, v0), b_(b) {} │ │ │ │ 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 │ │ │ │ -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 │ │ │ │ -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 │ │ │ │ -_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 │ │ │ │ +_5_1 _C_a_l_3___S_2_S_t_e_r_e_o(const Vector6& d) │ │ │ │ +52 : _C_a_l_3___S_2(d(0), d(1), d(2), d(3), d(4)), b_(d(5)) {} │ │ │ │ +53 │ │ │ │ +_5_5 _C_a_l_3___S_2_S_t_e_r_e_o(double fov, int w, int h, double b) │ │ │ │ +56 : _C_a_l_3___S_2(fov, w, h), b_(b) {} │ │ │ │ +57 │ │ │ │ +59 │ │ │ │ +67 _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_,_ _6_> Dcal = boost:: │ │ │ │ +none, │ │ │ │ +68 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +69 │ │ │ │ +77 _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_,_ _6_> Dcal = boost::none, │ │ │ │ +78 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +79 │ │ │ │ +_8_5 Vector3 _c_a_l_i_b_r_a_t_e(const Vector3& p) const { return Cal3_S2::calibrate(p); } │ │ │ │ +86 │ │ │ │ +89 │ │ │ │ +91 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +92 const _C_a_l_3___S_2_S_t_e_r_e_o& cal); │ │ │ │ +93 │ │ │ │ +95 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ +96 │ │ │ │ +98 bool _e_q_u_a_l_s(const _C_a_l_3___S_2_S_t_e_r_e_o& other, double tol = 10e-9) const; │ │ │ │ +99 │ │ │ │ +103 │ │ │ │ +_1_0_5 const _C_a_l_3___S_2& _c_a_l_i_b_r_a_t_i_o_n() const { return *this; } │ │ │ │ +106 │ │ │ │ +_1_0_8 Matrix3 _K() const override { return Cal3_S2::K(); } │ │ │ │ +109 │ │ │ │ +_1_1_1 inline double _b_a_s_e_l_i_n_e() const { return b_; } │ │ │ │ +112 │ │ │ │ +_1_1_4 Vector6 _v_e_c_t_o_r() const { │ │ │ │ +115 Vector6 v; │ │ │ │ +116 v << Cal3_S2::vector(), b_; │ │ │ │ +117 return v; │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +123 │ │ │ │ +_1_2_5 inline size_t _d_i_m() const override { return Dim(); } │ │ │ │ +126 │ │ │ │ +_1_2_8 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +129 │ │ │ │ +_1_3_1 inline _C_a_l_3___S_2_S_t_e_r_e_o _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ +132 return _C_a_l_3___S_2_S_t_e_r_e_o(fx() + d(0), fy() + d(1), skew() + d(2), px() + d(3), │ │ │ │ +133 py() + d(4), b_ + d(5)); │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +_1_3_7 Vector6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3___S_2_S_t_e_r_e_o& T2) const { │ │ │ │ +138 return T2._v_e_c_t_o_r() - vector(); │ │ │ │ +139 } │ │ │ │ +140 │ │ │ │ +144 │ │ │ │ +145 private: │ │ │ │ +_1_4_7 friend class boost::serialization::access; │ │ │ │ +148 template │ │ │ │ +149 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +150 ar& boost::serialization::make_nvp( │ │ │ │ +151 "Cal3_S2", boost::serialization::base_object(*this)); │ │ │ │ +152 ar& BOOST_SERIALIZATION_NVP(b_); │ │ │ │ +153 } │ │ │ │ +155}; │ │ │ │ +156 │ │ │ │ +157// Define GTSAM traits │ │ │ │ +158template <> │ │ │ │ +_1_5_9struct _t_r_a_i_t_s<_C_a_l_3___S_2_S_t_e_r_e_o> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +160 │ │ │ │ +161template <> │ │ │ │ +_1_6_2struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_M_a_n_i_f_o_l_d { │ │ │ │ +163}; │ │ │ │ +164 │ │ │ │ +165} // \ namespace gtsam │ │ │ │ +_C_a_l_3___S_2_._h │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_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 │ │ │ │ +_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 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 │ │ │ │ +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_:_:_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_:_:_R_a_n_g_e │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ +_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_:_:_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_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_S_t_e_r_e_o_:_:_v_e_c_t_o_r │ │ │ │ +Vector6 vector() const │ │ │ │ +vectorized form (column-wise) │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:114 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ +Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b) │ │ │ │ +constructor from doubles │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:47 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector6 localCoordinates(const Cal3_S2Stereo &T2) const │ │ │ │ +Unretraction for the calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:137 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_c_a_l_i_b_r_a_t_i_o_n │ │ │ │ +const Cal3_S2 & calibration() const │ │ │ │ +return calibration, same for left and right │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:105 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_d_i_m │ │ │ │ +size_t dim() const override │ │ │ │ +return DOF, dimensionality of tangent space │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:125 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_c_a_l_i_b_r_a_t_e │ │ │ │ +Vector3 calibrate(const Vector3 &p) const │ │ │ │ +Convert homogeneous image coordinates to intrinsic coordinates. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:85 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_r_e_t_r_a_c_t │ │ │ │ +Cal3_S2Stereo retract(const Vector &d) const │ │ │ │ +Given 6-dim tangent vector, create new calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:131 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_K │ │ │ │ +Matrix3 K() const override │ │ │ │ +return calibration matrix K, same for left and right │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:108 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +return DOF, dimensionality of tangent space │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:128 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ +Cal3_S2Stereo(double fov, int w, int h, double b) │ │ │ │ +easy constructor; field-of-view in degrees, assumes zero skew │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:55 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_b_a_s_e_l_i_n_e │ │ │ │ +double baseline() const │ │ │ │ +return baseline │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:111 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ +Cal3_S2Stereo(const Vector6 &d) │ │ │ │ +constructor from vector │ │ │ │ +DDeeffiinniittiioonn Cal3_S2Stereo.h:51 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ +Cal3_S2Stereo()=default │ │ │ │ +default calibration leaves coordinates unchanged │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_3_._h │ │ │ │ + * _C_a_l_3___S_2_S_t_e_r_e_o_._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.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/SimpleCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,63 +95,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
Point3.cpp File Reference
│ │ │ +Typedefs
│ │ │ +
SimpleCamera.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

3D Point │ │ │ +

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

│ │ │ -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)
 

│ │ │ +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 Point

│ │ │ +

A simple camera class with a Cal3_S2 calibration.

│ │ │ +
Date
Aug 16, 2009
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,45 +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 │ │ │ │ -Point3.cpp File Reference │ │ │ │ -3D Point _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 │ │ │ │ - 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 │ │ │ │ +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. │ │ │ │   │ │ │ │ -Point3Pair  ggttssaamm::::mmeeaannss (const std::vector< Point3Pair > &abPointPairs) │ │ │ │ -  Calculate the two means of a set of Point3 pairs. │ │ │ │ +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 > │ │ │ │   │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam::Point3Pair &p) │ │ │ │ +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 Point │ │ │ │ +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_i_n_t_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/a00380.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,8 +1,3 @@ │ │ │ │ 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] │ │ │ │ + ["PinholeCameraCal3_S2", "a00380.html#a3a2e8c622e65623a6853c84073bdb4f2", 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/Cal3_S2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,91 +95,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
Point2.h File Reference
│ │ │ +Namespaces
│ │ │ +
Cal3_S2.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

2D Point │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  gtsam::Range< Point2, Point2 >
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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -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

│ │ │ +

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

│ │ │
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,70 +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 | _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_._._. │ │ │ │ +_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 │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _P_o_i_n_t_2_,_ _P_o_i_n_t_2_ _> │ │ │ │ + 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. │ │ │ │   │ │ │ │ -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. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Point │ │ │ │ +The most common 5DOF 3D->2D calibration. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_2_._h │ │ │ │ + * _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/a00383.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,9 +1,4 @@ │ │ │ │ var a00383 = [ │ │ │ │ - ["gtsam::Range< Point2, Point2 >", "a03148.html", null], │ │ │ │ - ["Point2", "a00383.html#a6ede8384dee0353a0ce5fb54ea50c21d", null], │ │ │ │ - ["circleCircleIntersection", "a00383.html#a93d4e38a582b6f32fc4f301df10721d5", null], │ │ │ │ - ["distance2", "a00383.html#afd1282dfb080cb393ae60188b4582cb2", null], │ │ │ │ - ["means", "a00383.html#a9e357cda5287fae1438f86bc4df27a80", null], │ │ │ │ - ["norm2", "a00383.html#afee4e6aa4aba9b6a6b421ddd75b52dfc", null], │ │ │ │ - ["operator*", "a00383.html#a63d86e99c211c6daeac2b7b4dd9d928e", null] │ │ │ │ + ["gtsam::traits< Cal3_S2 >", "a02948.html", null], │ │ │ │ + ["gtsam::traits< const Cal3_S2 >", "a02952.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00383_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point2.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,116 +98,142 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Point2.h
│ │ │ +
Cal3_S2.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/VectorSpace.h>
│ │ │ -
21#include <boost/serialization/nvp.hpp>
│ │ │ -
22
│ │ │ -
23namespace gtsam {
│ │ │ -
24
│ │ │ -
27typedef Vector2 Point2;
│ │ │ -
28
│ │ │ -
29// Convenience typedef
│ │ │ -
30using Point2Pair = std::pair<Point2, Point2>;
│ │ │ -
31GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const gtsam::Point2Pair &p);
│ │ │ -
32
│ │ │ -
33using Point2Pairs = std::vector<Point2Pair>;
│ │ │ -
34
│ │ │ -
36GTSAM_EXPORT double norm2(const Point2& p, OptionalJacobian<1, 2> H = boost::none);
│ │ │ +
22#pragma once
│ │ │ +
23
│ │ │ +
24#include <gtsam/geometry/Cal3.h>
│ │ │ + │ │ │ +
26
│ │ │ +
27namespace gtsam {
│ │ │ +
28
│ │ │ +
│ │ │ +
34class GTSAM_EXPORT Cal3_S2 : public Cal3 {
│ │ │ +
35 public:
│ │ │ +
36 enum { dimension = 5 };
│ │ │
37
│ │ │ -
39GTSAM_EXPORT double distance2(const Point2& p1, const Point2& q,
│ │ │ -
40 OptionalJacobian<1, 2> H1 = boost::none,
│ │ │ -
41 OptionalJacobian<1, 2> H2 = boost::none);
│ │ │ -
42
│ │ │ -
43// For MATLAB wrapper
│ │ │ -
44typedef std::vector<Point2, Eigen::aligned_allocator<Point2> > Point2Vector;
│ │ │ -
45
│ │ │ -
│ │ │ -
47inline Point2 operator*(double s, const Point2& p) {
│ │ │ -
48 return Point2(s * p.x(), s * p.y());
│ │ │ -
49}
│ │ │ +
39 using shared_ptr = boost::shared_ptr<Cal3_S2>;
│ │ │ +
40
│ │ │ +
43
│ │ │ +
45 Cal3_S2() = default;
│ │ │ +
46
│ │ │ +
│ │ │ +
48 Cal3_S2(double fx, double fy, double s, double u0, double v0)
│ │ │ +
49 : Cal3(fx, fy, s, u0, v0) {}
│ │ │
│ │ │
50
│ │ │ -
51/*
│ │ │ -
52 * @brief Circle-circle intersection, given normalized radii.
│ │ │ -
53 * Calculate f and h, respectively the parallel and perpendicular distance of
│ │ │ -
54 * the intersections of two circles along and from the line connecting the centers.
│ │ │ -
55 * Both are dimensionless fractions of the distance d between the circle centers.
│ │ │ -
56 * If the circles do not intersect or they are identical, returns boost::none.
│ │ │ -
57 * If one solution (touching circles, as determined by tol), h will be exactly zero.
│ │ │ -
58 * h is a good measure for how accurate the intersection will be, as when circles touch
│ │ │ -
59 * or nearly touch, the intersection is ill-defined with noisy radius measurements.
│ │ │ -
60 * @param R_d : R/d, ratio of radius of first circle to distance between centers
│ │ │ -
61 * @param r_d : r/d, ratio of radius of second circle to distance between centers
│ │ │ -
62 * @param tol: absolute tolerance below which we consider touching circles
│ │ │ -
63 * @return optional Point2 with f and h, boost::none if no solution.
│ │ │ -
64 */
│ │ │ -
65GTSAM_EXPORT boost::optional<Point2> circleCircleIntersection(double R_d, double r_d, double tol = 1e-9);
│ │ │ -
66
│ │ │ -
67/*
│ │ │ -
68 * @brief Circle-circle intersection, from the normalized radii solution.
│ │ │ -
69 * @param c1 center of first circle
│ │ │ -
70 * @param c2 center of second circle
│ │ │ -
71 * @return list of solutions (0,1, or 2). Identical circles will return empty list, as well.
│ │ │ -
72 */
│ │ │ -
73GTSAM_EXPORT std::list<Point2> circleCircleIntersection(Point2 c1, Point2 c2, boost::optional<Point2> fh);
│ │ │ -
74
│ │ │ -
76GTSAM_EXPORT Point2Pair means(const std::vector<Point2Pair> &abPointPairs);
│ │ │ -
77
│ │ │ -
87GTSAM_EXPORT std::list<Point2> circleCircleIntersection(Point2 c1, double r1,
│ │ │ -
88 Point2 c2, double r2, double tol = 1e-9);
│ │ │ -
89
│ │ │ -
90template <typename A1, typename A2>
│ │ │ -
91struct Range;
│ │ │ +
52 Cal3_S2(const Vector5& d) : Cal3(d) {}
│ │ │ +
53
│ │ │ +
60 Cal3_S2(double fov, int w, int h) : Cal3(fov, w, h) {}
│ │ │ +
61
│ │ │ +
69 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 5> Dcal = boost::none,
│ │ │ +
70 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ +
71
│ │ │ +
79 Point2 calibrate(const Point2& p, OptionalJacobian<2, 5> Dcal = boost::none,
│ │ │ +
80 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ +
81
│ │ │ +
87 Vector3 calibrate(const Vector3& p) const;
│ │ │ +
88
│ │ │
92
│ │ │ -
93template <>
│ │ │ -
│ │ │ - │ │ │ -
95 typedef double result_type;
│ │ │ -
96 double operator()(const Point2& p, const Point2& q,
│ │ │ -
97 OptionalJacobian<1, 2> H1 = boost::none,
│ │ │ -
98 OptionalJacobian<1, 2> H2 = boost::none) {
│ │ │ -
99 return distance2(p, q, H1, H2);
│ │ │ -
100 }
│ │ │ -
101};
│ │ │ -
│ │ │ +
94 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ +
95 const Cal3_S2& cal);
│ │ │ +
96
│ │ │ +
98 void print(const std::string& s = "Cal3_S2") const override;
│ │ │ +
99
│ │ │ +
101 bool equals(const Cal3_S2& K, double tol = 10e-9) const;
│ │ │
102
│ │ │ -
103} // \ namespace gtsam
│ │ │ -
104
│ │ │ +
│ │ │ +
104 inline Cal3_S2 between(const Cal3_S2& q,
│ │ │ +
105 OptionalJacobian<5, 5> H1 = boost::none,
│ │ │ +
106 OptionalJacobian<5, 5> H2 = boost::none) const {
│ │ │ +
107 if (H1) *H1 = -I_5x5;
│ │ │ +
108 if (H2) *H2 = I_5x5;
│ │ │ +
109 return Cal3_S2(q.fx_ - fx_, q.fy_ - fy_, q.s_ - s_, q.u0_ - u0_,
│ │ │ +
110 q.v0_ - v0_);
│ │ │ +
111 }
│ │ │ +
│ │ │ +
112
│ │ │ +
116
│ │ │ +
118 inline static size_t Dim() { return dimension; }
│ │ │ +
119
│ │ │ +
│ │ │ +
121 inline Cal3_S2 retract(const Vector& d) const {
│ │ │ +
122 return Cal3_S2(fx_ + d(0), fy_ + d(1), s_ + d(2), u0_ + d(3), v0_ + d(4));
│ │ │ +
123 }
│ │ │ +
│ │ │ +
124
│ │ │ +
│ │ │ +
126 Vector5 localCoordinates(const Cal3_S2& T2) const {
│ │ │ +
127 return T2.vector() - vector();
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
133
│ │ │ +
134 private:
│ │ │ +
136 friend class boost::serialization::access;
│ │ │ +
137 template <class Archive>
│ │ │ +
138 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ +
139 ar& boost::serialization::make_nvp(
│ │ │ +
140 "Cal3_S2", boost::serialization::base_object<Cal3>(*this));
│ │ │ +
141 }
│ │ │ +
142
│ │ │ +
144};
│ │ │ +
│ │ │ +
145
│ │ │ +
146template <>
│ │ │ +
147struct traits<Cal3_S2> : public internal::Manifold<Cal3_S2> {};
│ │ │ +
148
│ │ │ +
149template <>
│ │ │ +
150struct traits<const Cal3_S2> : public internal::Manifold<Cal3_S2> {};
│ │ │ +
151
│ │ │ +
152} // \ namespace gtsam
│ │ │ +
Common code for all Calibration models.
│ │ │ +
2D Point
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Point2 operator*(double s, const Point2 &p)
multiply with scalar
Definition Point2.h:47
│ │ │ +
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
│ │ │ -
Point2Pair means(const std::vector< Point2Pair > &abPointPairs)
Calculate the two means of a set of Point2 pairs.
Definition Point2.cpp:116
│ │ │ -
double distance2(const Point2 &p, const Point2 &q, OptionalJacobian< 1, 2 > H1, OptionalJacobian< 1, 2 > H2)
distance between two points
Definition Point2.cpp:39
│ │ │ -
double norm2(const Point2 &p, OptionalJacobian< 1, 2 > H)
Distance of the point from the origin, with Jacobian.
Definition Point2.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
│ │ │ +
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
│ │ │ -
Definition BearingRange.h:40
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
Common base class for all calibration models.
Definition Cal3.h:69
│ │ │ +
Vector5 vector() const
vectorized form (column-wise)
Definition Cal3.h:160
│ │ │ +
double fy_
focal length
Definition Cal3.h:71
│ │ │ +
double s_
skew
Definition Cal3.h:72
│ │ │ +
double v0_
principal point
Definition Cal3.h:73
│ │ │ +
The most common 5DOF 3D->2D calibration.
Definition Cal3_S2.h:34
│ │ │ +
Cal3_S2()=default
Create a default calibration that leaves coordinates unchanged.
│ │ │ +
Cal3_S2(double fx, double fy, double s, double u0, double v0)
constructor from doubles
Definition Cal3_S2.h:48
│ │ │ +
Cal3_S2 between(const Cal3_S2 &q, OptionalJacobian< 5, 5 > H1=boost::none, OptionalJacobian< 5, 5 > H2=boost::none) const
"Between", subtracts calibrations. between(p,q) == compose(inverse(p),q)
Definition Cal3_S2.h:104
│ │ │ +
static size_t Dim()
return DOF, dimensionality of tangent space
Definition Cal3_S2.h:118
│ │ │ +
Cal3_S2(const Vector5 &d)
constructor from vector
Definition Cal3_S2.h:52
│ │ │ +
Vector5 localCoordinates(const Cal3_S2 &T2) const
Unretraction for the calibration.
Definition Cal3_S2.h:126
│ │ │ +
Cal3_S2(double fov, int w, int h)
Easy constructor, takes fov in degrees, asssumes zero skew, unit aspect.
Definition Cal3_S2.h:60
│ │ │ +
Cal3_S2 retract(const Vector &d) const
Given 5-dim tangent vector, create new calibration.
Definition Cal3_S2.h:121
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,140 +1,186 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Point2.h │ │ │ │ +Cal3_S2.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 │ │ │ │ -21#include │ │ │ │ -22 │ │ │ │ -23namespace _g_t_s_a_m { │ │ │ │ -24 │ │ │ │ -_2_7typedef Vector2 _P_o_i_n_t_2; │ │ │ │ +22#pragma once │ │ │ │ +23 │ │ │ │ +24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_C_a_l_3_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ +26 │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ 28 │ │ │ │ -29// Convenience typedef │ │ │ │ -30using Point2Pair = std::pair; │ │ │ │ -31GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const gtsam:: │ │ │ │ -Point2Pair &p); │ │ │ │ -32 │ │ │ │ -33using Point2Pairs = std::vector; │ │ │ │ -34 │ │ │ │ -36GTSAM_EXPORT double _n_o_r_m_2(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); │ │ │ │ +_3_4class GTSAM_EXPORT _C_a_l_3___S_2 : public _C_a_l_3 { │ │ │ │ +35 public: │ │ │ │ +36 enum { dimension = 5 }; │ │ │ │ 37 │ │ │ │ -39GTSAM_EXPORT double _d_i_s_t_a_n_c_e_2(const _P_o_i_n_t_2& p1, const _P_o_i_n_t_2& q, │ │ │ │ -40 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H1 = boost::none, │ │ │ │ -41 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H2 = boost::none); │ │ │ │ -42 │ │ │ │ -43// For MATLAB wrapper │ │ │ │ -44typedef std::vector > Point2Vector; │ │ │ │ -45 │ │ │ │ -_4_7inline _P_o_i_n_t_2 _o_p_e_r_a_t_o_r_*(double s, const _P_o_i_n_t_2& p) { │ │ │ │ -48 return _P_o_i_n_t_2(s * p.x(), s * p.y()); │ │ │ │ -49} │ │ │ │ +39 using shared_ptr = boost::shared_ptr; │ │ │ │ +40 │ │ │ │ +43 │ │ │ │ +_4_5 _C_a_l_3___S_2() = default; │ │ │ │ +46 │ │ │ │ +_4_8 _C_a_l_3___S_2(double fx, double fy, double s, double u0, double v0) │ │ │ │ +49 : _C_a_l_3(fx, fy, s, u0, v0) {} │ │ │ │ 50 │ │ │ │ -51/* │ │ │ │ -52 * @brief Circle-circle intersection, given normalized radii. │ │ │ │ -53 * Calculate f and h, respectively the parallel and perpendicular distance of │ │ │ │ -54 * the intersections of two circles along and from the line connecting the │ │ │ │ -centers. │ │ │ │ -55 * Both are dimensionless fractions of the distance d between the circle │ │ │ │ -centers. │ │ │ │ -56 * If the circles do not intersect or they are identical, returns boost:: │ │ │ │ -none. │ │ │ │ -57 * If one solution (touching circles, as determined by tol), h will be │ │ │ │ -exactly zero. │ │ │ │ -58 * h is a good measure for how accurate the intersection will be, as when │ │ │ │ -circles touch │ │ │ │ -59 * or nearly touch, the intersection is ill-defined with noisy radius │ │ │ │ -measurements. │ │ │ │ -60 * @param R_d : R/d, ratio of radius of first circle to distance between │ │ │ │ -centers │ │ │ │ -61 * @param r_d : r/d, ratio of radius of second circle to distance between │ │ │ │ -centers │ │ │ │ -62 * @param tol: absolute tolerance below which we consider touching circles │ │ │ │ -63 * @return optional Point2 with f and h, boost::none if no solution. │ │ │ │ -64 */ │ │ │ │ -65GTSAM_EXPORT boost::optional circleCircleIntersection(double R_d, │ │ │ │ -double r_d, double tol = 1e-9); │ │ │ │ -66 │ │ │ │ -67/* │ │ │ │ -68 * @brief Circle-circle intersection, from the normalized radii solution. │ │ │ │ -69 * @param c1 center of first circle │ │ │ │ -70 * @param c2 center of second circle │ │ │ │ -71 * @return list of solutions (0,1, or 2). Identical circles will return empty │ │ │ │ -list, as well. │ │ │ │ -72 */ │ │ │ │ -73GTSAM_EXPORT std::list circleCircleIntersection(_P_o_i_n_t_2 c1, _P_o_i_n_t_2 c2, │ │ │ │ -boost::optional fh); │ │ │ │ -74 │ │ │ │ -76GTSAM_EXPORT Point2Pair _m_e_a_n_s(const std::vector &abPointPairs); │ │ │ │ -77 │ │ │ │ -87GTSAM_EXPORT std::list circleCircleIntersection(_P_o_i_n_t_2 c1, double r1, │ │ │ │ -88 _P_o_i_n_t_2 c2, double r2, double tol = 1e-9); │ │ │ │ -89 │ │ │ │ -90template │ │ │ │ -91struct Range; │ │ │ │ +_5_2 _C_a_l_3___S_2(const Vector5& d) : _C_a_l_3(d) {} │ │ │ │ +53 │ │ │ │ +_6_0 _C_a_l_3___S_2(double fov, int w, int h) : _C_a_l_3(fov, w, h) {} │ │ │ │ +61 │ │ │ │ +69 _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_,_ _5_> Dcal = boost:: │ │ │ │ +none, │ │ │ │ +70 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +71 │ │ │ │ +79 _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_,_ _5_> Dcal = boost::none, │ │ │ │ +80 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +81 │ │ │ │ +87 Vector3 calibrate(const Vector3& p) const; │ │ │ │ +88 │ │ │ │ 92 │ │ │ │ -93template <> │ │ │ │ -_9_4struct _R_a_n_g_e<_P_o_i_n_t_2, _P_o_i_n_t_2> { │ │ │ │ -95 typedef double result_type; │ │ │ │ -96 double operator()(const _P_o_i_n_t_2& p, const _P_o_i_n_t_2& q, │ │ │ │ -97 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H1 = boost::none, │ │ │ │ -98 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _2_> H2 = boost::none) { │ │ │ │ -99 return _d_i_s_t_a_n_c_e_2(p, q, H1, H2); │ │ │ │ -100 } │ │ │ │ -101}; │ │ │ │ +94 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +95 const _C_a_l_3___S_2& cal); │ │ │ │ +96 │ │ │ │ +98 void _p_r_i_n_t(const std::string& s = "Cal3_S2") const override; │ │ │ │ +99 │ │ │ │ +101 bool _e_q_u_a_l_s(const _C_a_l_3___S_2& K, double tol = 10e-9) const; │ │ │ │ 102 │ │ │ │ -103} // \ namespace gtsam │ │ │ │ -104 │ │ │ │ +_1_0_4 inline _C_a_l_3___S_2 _b_e_t_w_e_e_n(const _C_a_l_3___S_2& q, │ │ │ │ +105 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _5_> H1 = boost::none, │ │ │ │ +106 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _5_> H2 = boost::none) const { │ │ │ │ +107 if (H1) *H1 = -I_5x5; │ │ │ │ +108 if (H2) *H2 = I_5x5; │ │ │ │ +109 return _C_a_l_3___S_2(q.fx_ - fx_, q._f_y__ - fy_, q._s__ - s_, q.u0_ - u0_, │ │ │ │ +110 q._v_0__ - v0_); │ │ │ │ +111 } │ │ │ │ +112 │ │ │ │ +116 │ │ │ │ +_1_1_8 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +119 │ │ │ │ +_1_2_1 inline _C_a_l_3___S_2 _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ +122 return _C_a_l_3___S_2(fx_ + d(0), fy_ + d(1), s_ + d(2), u0_ + d(3), v0_ + d(4)); │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +_1_2_6 Vector5 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3___S_2& T2) const { │ │ │ │ +127 return T2._v_e_c_t_o_r() - vector(); │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +133 │ │ │ │ +134 private: │ │ │ │ +_1_3_6 friend class boost::serialization::access; │ │ │ │ +137 template │ │ │ │ +138 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +139 ar& boost::serialization::make_nvp( │ │ │ │ +140 "Cal3_S2", boost::serialization::base_object(*this)); │ │ │ │ +141 } │ │ │ │ +142 │ │ │ │ +144}; │ │ │ │ +145 │ │ │ │ +146template <> │ │ │ │ +_1_4_7struct _t_r_a_i_t_s<_C_a_l_3___S_2> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +148 │ │ │ │ +149template <> │ │ │ │ +_1_5_0struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +151 │ │ │ │ +152} // \ namespace gtsam │ │ │ │ +_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_:_:_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_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_:_:_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_2 │ │ │ │ -double distance2(const Point2 &p, const Point2 &q, OptionalJacobian< 1, 2 > H1, │ │ │ │ -OptionalJacobian< 1, 2 > H2) │ │ │ │ -distance between two points │ │ │ │ -DDeeffiinniittiioonn Point2.cpp:39 │ │ │ │ -_g_t_s_a_m_:_:_n_o_r_m_2 │ │ │ │ -double norm2(const Point2 &p, OptionalJacobian< 1, 2 > H) │ │ │ │ -Distance of the point from the origin, with Jacobian. │ │ │ │ -DDeeffiinniittiioonn Point2.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_:_:_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_:_:_R_a_n_g_e │ │ │ │ -DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ +_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_:_:_C_a_l_3 │ │ │ │ +Common base class for all calibration models. │ │ │ │ +DDeeffiinniittiioonn Cal3.h:69 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_:_:_v_e_c_t_o_r │ │ │ │ +Vector5 vector() const │ │ │ │ +vectorized form (column-wise) │ │ │ │ +DDeeffiinniittiioonn Cal3.h:160 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_:_:_f_y__ │ │ │ │ +double fy_ │ │ │ │ +focal length │ │ │ │ +DDeeffiinniittiioonn Cal3.h:71 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_:_:_s__ │ │ │ │ +double s_ │ │ │ │ +skew │ │ │ │ +DDeeffiinniittiioonn Cal3.h:72 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_:_:_v_0__ │ │ │ │ +double v0_ │ │ │ │ +principal point │ │ │ │ +DDeeffiinniittiioonn Cal3.h:73 │ │ │ │ +_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_l_3___S_2_:_:_C_a_l_3___S_2 │ │ │ │ +Cal3_S2()=default │ │ │ │ +Create a default calibration that leaves coordinates unchanged. │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_C_a_l_3___S_2 │ │ │ │ +Cal3_S2(double fx, double fy, double s, double u0, double v0) │ │ │ │ +constructor from doubles │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:48 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_b_e_t_w_e_e_n │ │ │ │ +Cal3_S2 between(const Cal3_S2 &q, OptionalJacobian< 5, 5 > H1=boost::none, │ │ │ │ +OptionalJacobian< 5, 5 > H2=boost::none) const │ │ │ │ +"Between", subtracts calibrations. between(p,q) == compose(inverse(p),q) │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:104 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +return DOF, dimensionality of tangent space │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:118 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_C_a_l_3___S_2 │ │ │ │ +Cal3_S2(const Vector5 &d) │ │ │ │ +constructor from vector │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:52 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector5 localCoordinates(const Cal3_S2 &T2) const │ │ │ │ +Unretraction for the calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:126 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_C_a_l_3___S_2 │ │ │ │ +Cal3_S2(double fov, int w, int h) │ │ │ │ +Easy constructor, takes fov in degrees, asssumes zero skew, unit aspect. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:60 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3___S_2_:_:_r_e_t_r_a_c_t │ │ │ │ +Cal3_S2 retract(const Vector &d) const │ │ │ │ +Given 5-dim tangent vector, create new calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3_S2.h:121 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_2_._h │ │ │ │ + * _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/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/Cal3Unified.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,63 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Point2.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
Cal3Unified.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

2D Point │ │ │ +

Unified Calibration Model, see Mei07icra for details. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::Cal3Unified
 Calibration of a omni-directional camera with mirror + lens radial distortion. More...
 
struct  gtsam::traits< Cal3Unified >
 
struct  gtsam::traits< const Cal3Unified >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -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)
 
│ │ │

Detailed Description

│ │ │ -

2D Point

│ │ │ -
Author
Frank Dellaert
│ │ │ +

Unified Calibration Model, see Mei07icra for details.

│ │ │ +
Date
Mar 8, 2014
│ │ │ +
Author
Jing Dong
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +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 │ │ │ │ -Point2.cpp File Reference │ │ │ │ -2D Point _M_o_r_e_._._. │ │ │ │ -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 │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +Cal3Unified.h File Reference │ │ │ │ +Unified Calibration Model, see Mei07icra for details. _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_U_n_i_f_i_e_d │ │ │ │ +  Calibration of a omni-directional camera with mirror + lens radial │ │ │ │ + distortion. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -boost::optional< _P_o_i_n_t_2 >  ggttssaamm::::cciirrcclleeCCiirrcclleeIInntteerrsseeccttiioonn (double R_d, double │ │ │ │ - r_d, double tol) │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_U_n_i_f_i_e_d_ _> │ │ │ │   │ │ │ │ - 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) │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3_U_n_i_f_i_e_d_ _> │ │ │ │   │ │ │ │ - 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. │ │ │ │ -  │ │ │ │ - ostream &  ggttssaamm::::ooppeerraattoorr<<<< (ostream &os, const gtsam:: │ │ │ │ - Point2Pair &p) │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _g_t_s_a_m │ │ │ │ +  Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -2D Point │ │ │ │ +Unified Calibration Model, see Mei07icra for details. │ │ │ │ + Date │ │ │ │ + Mar 8, 2014 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Jing Dong │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_o_i_n_t_2_._c_p_p │ │ │ │ + * _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/a00386.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,4 @@ │ │ │ │ var a00386 = [ │ │ │ │ - ["circleCircleIntersection", "a00386.html#a93d4e38a582b6f32fc4f301df10721d5", null], │ │ │ │ - ["distance2", "a00386.html#afd1282dfb080cb393ae60188b4582cb2", null], │ │ │ │ - ["means", "a00386.html#a9e357cda5287fae1438f86bc4df27a80", null], │ │ │ │ - ["norm2", "a00386.html#afee4e6aa4aba9b6a6b421ddd75b52dfc", null] │ │ │ │ + ["gtsam::traits< Cal3Unified >", "a03012.html", null], │ │ │ │ + ["gtsam::traits< const Cal3Unified >", "a03016.html", 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/Cal3Bundler.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,48 +94,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
PinholeSet.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Cal3Bundler.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ -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.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

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

Detailed Description

│ │ │ -

A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera.

│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Sep 25, 2010
│ │ │ +
Author
ydjian
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 | _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 ********** │ │ │ │ -A CameraSet of either CalibratedCamera, PinholePose, or PinholeCamera. │ │ │ │ + Date │ │ │ │ + Sep 25, 2010 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + ydjian │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _P_i_n_h_o_l_e_S_e_t_._h │ │ │ │ + * _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/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/SOn.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,54 +94,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
PinholePose.h File Reference
│ │ │ +
SOn.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Pinhole camera with known calibration. │ │ │ +

Definitions of dynamic specializations of SO(n) │ │ │ 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
│ │ │ +

Definitions of dynamic specializations of SO(n)

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │ -Frank Dellaert
│ │ │ -
Date
Feb 20, 2015
│ │ │ +Varun Agrawal
│ │ │ +
Date
March 2019
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ +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 ********** │ │ │ │ -Pinhole camera with known calibration. │ │ │ │ +Definitions of dynamic specializations of SO(n) │ │ │ │ Author │ │ │ │ - Yong-Dian Jian │ │ │ │ Frank Dellaert │ │ │ │ + Varun Agrawal │ │ │ │ Date │ │ │ │ - Feb 20, 2015 │ │ │ │ + March 2019 │ │ │ │ * _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 │ │ │ │ + * _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/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/CalibratedCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,49 +96,54 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
PinholeCamera.h File Reference
│ │ │ +
CalibratedCamera.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Base class for all pinhole cameras. │ │ │ +

Calibrated camera for which only pose is unknown. │ │ │ 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...
class  gtsam::CheiralityException
 
struct  gtsam::traits< PinholeCamera< Calibration > >
class  gtsam::PinholeBase
 A pinhole camera class that has a Pose3, functions as base class for all pinhole cameras. More...
 
struct  gtsam::traits< const PinholeCamera< Calibration > >
class  gtsam::CalibratedCamera
 A Calibrated camera class [R|-R't], calibration K=I. More...
 
struct  gtsam::Range< PinholeCamera< Calibration >, T >
struct  gtsam::traits< CalibratedCamera >
 
struct  gtsam::traits< const CalibratedCamera >
 
struct  gtsam::Range< CalibratedCamera, 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
│ │ │ +

Calibrated camera for which only pose is unknown.

│ │ │ +
Date
Aug 17, 2009
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +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 │ │ │ │ -PinholeCamera.h File Reference │ │ │ │ -Base class for all pinhole cameras. _M_o_r_e_._._. │ │ │ │ +CalibratedCamera.h File Reference │ │ │ │ +Calibrated camera for which only pose is unknown. _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_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_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_:_:_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_ _>_ _> │ │ │ │ + class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ +  A pinhole camera class that has a _P_o_s_e_3, functions as base class for │ │ │ │ + all pinhole cameras. _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_C_a_m_e_r_a_<_ _C_a_l_i_b_r_a_t_i_o_n_ _>_ _> │ │ │ │ + class   _g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +  A Calibrated camera class [R|-R't], calibration K=I. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -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_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_ _> │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_,_ _T_ _> │ │ │ │   │ │ │ │ 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 │ │ │ │ +Calibrated camera for which only pose is unknown. │ │ │ │ Date │ │ │ │ - Jan 27, 2012 │ │ │ │ + Aug 17, 2009 │ │ │ │ + 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 │ │ │ │ + * _C_a_l_i_b_r_a_t_e_d_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/a00395.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,6 @@ │ │ │ │ var a00395 = [ │ │ │ │ - ["gtsam::traits< PinholeCamera< Calibration > >", "a03108.html", null], │ │ │ │ - ["gtsam::traits< const PinholeCamera< Calibration > >", "a03112.html", null], │ │ │ │ - ["gtsam::Range< PinholeCamera< Calibration >, T >", "a03116.html", null] │ │ │ │ + ["gtsam::CheiralityException", "a03020.html", null], │ │ │ │ + ["gtsam::traits< CalibratedCamera >", "a03032.html", null], │ │ │ │ + ["gtsam::traits< const CalibratedCamera >", "a03036.html", null], │ │ │ │ + ["gtsam::Range< CalibratedCamera, T >", "a03040.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00395_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeCamera.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/CalibratedCamera.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
PinholeCamera.h
│ │ │ +
CalibratedCamera.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,384 +114,352 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ - │ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
32template<typename Calibration>
│ │ │ -
│ │ │ -
33class PinholeCamera: public PinholeBaseK<Calibration> {
│ │ │ -
34
│ │ │ -
35public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
24#include <gtsam/base/concepts.h>
│ │ │ +
25#include <gtsam/base/Manifold.h>
│ │ │ + │ │ │ +
27#include <gtsam/dllexport.h>
│ │ │ +
28#include <boost/serialization/nvp.hpp>
│ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
│ │ │ +
32class GTSAM_EXPORT CheiralityException: public ThreadsafeException<CheiralityException> {
│ │ │ +
33public:
│ │ │ + │ │ │ +
35 : CheiralityException(std::numeric_limits<Key>::max()) {}
│ │ │
36
│ │ │ - │ │ │ -
42 typedef Point2Vector MeasurementVector;
│ │ │ -
43
│ │ │ -
44private:
│ │ │ -
45
│ │ │ - │ │ │ -
47 Calibration K_;
│ │ │ -
48
│ │ │ -
49 // Get dimensions of calibration type at compile time
│ │ │ -
50 static const int DimK = FixedDimension<Calibration>::value;
│ │ │ -
51
│ │ │ -
52public:
│ │ │ + │ │ │ +
38 : ThreadsafeException<CheiralityException>("CheiralityException"),
│ │ │ +
39 j_(j) {}
│ │ │ +
40
│ │ │ +
41 Key nearbyVariable() const {return j_;}
│ │ │ +
42
│ │ │ +
43private:
│ │ │ +
44 Key j_;
│ │ │ +
45};
│ │ │ +
│ │ │ +
46
│ │ │ +
│ │ │ +
52class GTSAM_EXPORT PinholeBase {
│ │ │
53
│ │ │ -
54 enum {
│ │ │ -
55 dimension = 6 + DimK
│ │ │ -
56 };
│ │ │ -
57
│ │ │ -
60
│ │ │ -
│ │ │ - │ │ │ -
63 }
│ │ │ -
│ │ │ -
64
│ │ │ -
│ │ │ -
66 explicit PinholeCamera(const Pose3& pose) :
│ │ │ -
67 Base(pose) {
│ │ │ -
68 }
│ │ │ -
│ │ │ -
69
│ │ │ -
│ │ │ -
71 PinholeCamera(const Pose3& pose, const Calibration& K) :
│ │ │ -
72 Base(pose), K_(K) {
│ │ │ -
73 }
│ │ │ -
│ │ │ -
74
│ │ │ -
78
│ │ │ -
│ │ │ -
86 static PinholeCamera Level(const Calibration &K, const Pose2& pose2,
│ │ │ -
87 double height) {
│ │ │ -
88 return PinholeCamera(Base::LevelPose(pose2, height), K);
│ │ │ -
89 }
│ │ │ -
│ │ │ +
54public:
│ │ │ +
55
│ │ │ +
57 typedef Rot3 Rotation;
│ │ │ +
58 typedef Point3 Translation;
│ │ │ +
59
│ │ │ + │ │ │ +
65 typedef Point2Vector MeasurementVector;
│ │ │ +
66
│ │ │ +
67private:
│ │ │ +
68
│ │ │ +
69 Pose3 pose_;
│ │ │ +
70
│ │ │ +
71protected:
│ │ │ +
72
│ │ │ +
75
│ │ │ +
81 static Matrix26 Dpose(const Point2& pn, double d);
│ │ │ +
82
│ │ │ +
89 static Matrix23 Dpoint(const Point2& pn, double d, const Matrix3& Rt);
│ │ │
90
│ │ │ -
│ │ │ -
92 static PinholeCamera Level(const Pose2& pose2, double height) {
│ │ │ -
93 return PinholeCamera::Level(Calibration(), pose2, height);
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
105 static PinholeCamera Lookat(const Point3& eye, const Point3& target,
│ │ │ -
106 const Point3& upVector, const Calibration& K = Calibration()) {
│ │ │ -
107 return PinholeCamera(Base::LookatPose(eye, target, upVector), K);
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
110 // Create PinholeCamera, with derivatives
│ │ │ -
111 static PinholeCamera Create(const Pose3& pose, const Calibration &K,
│ │ │ -
112 OptionalJacobian<dimension, 6> H1 = boost::none, //
│ │ │ -
113 OptionalJacobian<dimension, DimK> H2 = boost::none) {
│ │ │ -
114 typedef Eigen::Matrix<double, DimK, 6> MatrixK6;
│ │ │ -
115 if (H1)
│ │ │ -
116 *H1 << I_6x6, MatrixK6::Zero();
│ │ │ -
117 typedef Eigen::Matrix<double, 6, DimK> Matrix6K;
│ │ │ -
118 typedef Eigen::Matrix<double, DimK, DimK> MatrixK;
│ │ │ -
119 if (H2)
│ │ │ -
120 *H2 << Matrix6K::Zero(), MatrixK::Identity();
│ │ │ -
121 return PinholeCamera(pose,K);
│ │ │ -
122 }
│ │ │ -
123
│ │ │ +
92
│ │ │ +
93public:
│ │ │ +
94
│ │ │ +
97
│ │ │ +
105 static Pose3 LevelPose(const Pose2& pose2, double height);
│ │ │ +
106
│ │ │ +
115 static Pose3 LookatPose(const Point3& eye, const Point3& target,
│ │ │ +
116 const Point3& upVector);
│ │ │ +
117
│ │ │ +
121
│ │ │ + │ │ │ +
124
│ │ │ +
126 explicit PinholeBase(const Pose3& pose) : pose_(pose) {}
│ │ │
127
│ │ │ -
│ │ │ -
129 explicit PinholeCamera(const Vector &v) :
│ │ │ -
130 Base(v.head<6>()) {
│ │ │ -
131 if (v.size() > 6)
│ │ │ -
132 K_ = Calibration(v.tail<DimK>());
│ │ │ -
133 }
│ │ │ -
│ │ │ -
134
│ │ │ -
│ │ │ -
136 PinholeCamera(const Vector &v, const Vector &K) :
│ │ │ -
137 Base(v), K_(K) {
│ │ │ -
138 }
│ │ │ -
│ │ │ -
139
│ │ │ +
131
│ │ │ +
132 explicit PinholeBase(const Vector& v) : pose_(Pose3::Expmap(v)) {}
│ │ │ +
133
│ │ │ +
135 virtual ~PinholeBase() = default;
│ │ │ +
136
│ │ │ +
140
│ │ │ +
142 bool equals(const PinholeBase &camera, double tol = 1e-9) const;
│ │ │
143
│ │ │ -
│ │ │ -
145 bool equals(const Base &camera, double tol = 1e-9) const {
│ │ │ -
146 const PinholeCamera* e = dynamic_cast<const PinholeCamera*>(&camera);
│ │ │ -
147 return Base::equals(camera, tol) && K_.equals(e->calibration(), tol);
│ │ │ -
148 }
│ │ │ -
│ │ │ -
149
│ │ │ -
│ │ │ -
151 void print(const std::string& s = "PinholeCamera") const override {
│ │ │ -
152 Base::print(s);
│ │ │ -
153 K_.print(s + ".calibration");
│ │ │ +
145 virtual void print(const std::string& s = "PinholeBase") const;
│ │ │ +
146
│ │ │ +
150
│ │ │ +
│ │ │ +
152 const Pose3& pose() const {
│ │ │ +
153 return pose_;
│ │ │
154 }
│ │ │
│ │ │
155
│ │ │ -
159
│ │ │ -
160 ~PinholeCamera() override {
│ │ │ -
161 }
│ │ │ -
162
│ │ │ -
│ │ │ -
164 const Pose3& pose() const {
│ │ │ -
165 return Base::pose();
│ │ │ -
166 }
│ │ │ -
│ │ │ -
167
│ │ │ -
│ │ │ - │ │ │ -
170 if (H) {
│ │ │ -
171 H->setZero();
│ │ │ -
172 H->template block<6, 6>(0, 0) = I_6x6;
│ │ │ -
173 }
│ │ │ -
174 return Base::pose();
│ │ │ -
175 }
│ │ │ -
│ │ │ -
176
│ │ │ -
│ │ │ -
178 const Calibration& calibration() const override {
│ │ │ -
179 return K_;
│ │ │ -
180 }
│ │ │ -
│ │ │ -
181
│ │ │ -
185
│ │ │ -
│ │ │ -
187 size_t dim() const {
│ │ │ -
188 return dimension;
│ │ │ -
189 }
│ │ │ -
│ │ │ -
190
│ │ │ -
│ │ │ -
192 static size_t Dim() {
│ │ │ -
193 return dimension;
│ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
196 typedef Eigen::Matrix<double, dimension, 1> VectorK6;
│ │ │ -
197
│ │ │ -
│ │ │ -
199 PinholeCamera retract(const Vector& d) const {
│ │ │ -
200 if ((size_t) d.size() == 6)
│ │ │ -
201 return PinholeCamera(this->pose().retract(d), calibration());
│ │ │ -
202 else
│ │ │ -
203 return PinholeCamera(this->pose().retract(d.head<6>()),
│ │ │ -
204 calibration().retract(d.tail(calibration().dim())));
│ │ │ -
205 }
│ │ │ -
│ │ │ -
206
│ │ │ -
│ │ │ -
208 VectorK6 localCoordinates(const PinholeCamera& T2) const {
│ │ │ -
209 VectorK6 d;
│ │ │ -
210 d.template head<6>() = this->pose().localCoordinates(T2.pose());
│ │ │ -
211 d.template tail<DimK>() = calibration().localCoordinates(T2.calibration());
│ │ │ -
212 return d;
│ │ │ -
213 }
│ │ │ -
│ │ │ -
214
│ │ │ -
│ │ │ - │ │ │ -
217 return PinholeCamera(); // assumes that the default constructor is valid
│ │ │ -
218 }
│ │ │ -
│ │ │ -
219
│ │ │ -
223
│ │ │ -
224 typedef Eigen::Matrix<double, 2, DimK> Matrix2K;
│ │ │ -
225
│ │ │ -
229 template<class POINT>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
232 // We just call 3-derivative version in Base
│ │ │ -
233 if (Dcamera){
│ │ │ -
234 Matrix26 Dpose;
│ │ │ -
235 Eigen::Matrix<double, 2, DimK> Dcal;
│ │ │ -
236 const Point2 pi = Base::project(pw, Dpose, Dpoint, Dcal);
│ │ │ -
237 *Dcamera << Dpose, Dcal;
│ │ │ -
238 return pi;
│ │ │ -
239 } else {
│ │ │ -
240 return Base::project(pw, boost::none, Dpoint, boost::none);
│ │ │ -
241 }
│ │ │ -
242 }
│ │ │ -
│ │ │ -
243
│ │ │ -
│ │ │ - │ │ │ -
246 boost::none, OptionalJacobian<2, 3> Dpoint = boost::none) const {
│ │ │ -
247 return _project2(pw, Dcamera, Dpoint);
│ │ │ -
248 }
│ │ │ -
│ │ │ -
249
│ │ │ -
│ │ │ - │ │ │ -
252 boost::none, OptionalJacobian<2, 2> Dpoint = boost::none) const {
│ │ │ -
253 return _project2(pw, Dcamera, Dpoint);
│ │ │ -
254 }
│ │ │ -
│ │ │ -
255
│ │ │ -
│ │ │ -
261 double range(const Point3& point, OptionalJacobian<1, dimension> Dcamera =
│ │ │ -
262 boost::none, OptionalJacobian<1, 3> Dpoint = boost::none) const {
│ │ │ -
263 Matrix16 Dpose_;
│ │ │ -
264 double result = this->pose().range(point, Dcamera ? &Dpose_ : 0, Dpoint);
│ │ │ -
265 if (Dcamera)
│ │ │ -
266 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ -
267 return result;
│ │ │ -
268 }
│ │ │ -
│ │ │ -
269
│ │ │ -
│ │ │ - │ │ │ -
276 boost::none, OptionalJacobian<1, 6> Dpose = boost::none) const {
│ │ │ -
277 Matrix16 Dpose_;
│ │ │ -
278 double result = this->pose().range(pose, Dcamera ? &Dpose_ : 0, Dpose);
│ │ │ -
279 if (Dcamera)
│ │ │ -
280 *Dcamera << Dpose_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ -
281 return result;
│ │ │ -
282 }
│ │ │ -
│ │ │ -
283
│ │ │ -
289 template<class CalibrationB>
│ │ │ -
│ │ │ -
290 double range(const PinholeCamera<CalibrationB>& camera,
│ │ │ -
291 OptionalJacobian<1, dimension> Dcamera = boost::none,
│ │ │ -
292 OptionalJacobian<1, 6 + CalibrationB::dimension> Dother = boost::none) const {
│ │ │ -
293 Matrix16 Dcamera_, Dother_;
│ │ │ -
294 double result = this->pose().range(camera.pose(), Dcamera ? &Dcamera_ : 0,
│ │ │ -
295 Dother ? &Dother_ : 0);
│ │ │ -
296 if (Dcamera) {
│ │ │ -
297 *Dcamera << Dcamera_, Eigen::Matrix<double, 1, DimK>::Zero();
│ │ │ -
298 }
│ │ │ -
299 if (Dother) {
│ │ │ -
300 Dother->setZero();
│ │ │ -
301 Dother->template block<1, 6>(0, 0) = Dother_;
│ │ │ -
302 }
│ │ │ -
303 return result;
│ │ │ -
304 }
│ │ │ -
│ │ │ -
305
│ │ │ -
│ │ │ -
311 double range(const CalibratedCamera& camera,
│ │ │ -
312 OptionalJacobian<1, dimension> Dcamera = boost::none,
│ │ │ -
313 OptionalJacobian<1, 6> Dother = boost::none) const {
│ │ │ -
314 return range(camera.pose(), Dcamera, Dother);
│ │ │ -
315 }
│ │ │ -
│ │ │ -
316
│ │ │ -
│ │ │ -
318 Matrix34 cameraProjectionMatrix() const {
│ │ │ -
319 return K_.K() * PinholeBase::pose().inverse().matrix().block(0, 0, 3, 4);
│ │ │ -
320 }
│ │ │ -
│ │ │ +
│ │ │ +
157 const Rot3& rotation() const {
│ │ │ +
158 return pose_.rotation();
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
│ │ │ +
162 const Point3& translation() const {
│ │ │ +
163 return pose_.translation();
│ │ │ +
164 }
│ │ │ +
│ │ │ +
165
│ │ │ +
167 const Pose3& getPose(OptionalJacobian<6, 6> H) const;
│ │ │ +
168
│ │ │ +
172
│ │ │ +
178 static Point2 Project(const Point3& pc, //
│ │ │ +
179 OptionalJacobian<2, 3> Dpoint = boost::none);
│ │ │ +
180
│ │ │ +
186 static Point2 Project(const Unit3& pc, //
│ │ │ +
187 OptionalJacobian<2, 2> Dpoint = boost::none);
│ │ │ +
188
│ │ │ +
190 std::pair<Point2, bool> projectSafe(const Point3& pw) const;
│ │ │ +
191
│ │ │ +
197 Point2 project2(const Point3& point, OptionalJacobian<2, 6> Dpose =
│ │ │ +
198 boost::none, OptionalJacobian<2, 3> Dpoint = boost::none) const;
│ │ │ +
199
│ │ │ +
205 Point2 project2(const Unit3& point,
│ │ │ +
206 OptionalJacobian<2, 6> Dpose = boost::none,
│ │ │ +
207 OptionalJacobian<2, 2> Dpoint = boost::none) const;
│ │ │ +
208
│ │ │ +
210 static Point3 BackprojectFromCamera(const Point2& p, const double depth,
│ │ │ +
211 OptionalJacobian<3, 2> Dpoint = boost::none,
│ │ │ +
212 OptionalJacobian<3, 1> Ddepth = boost::none);
│ │ │ +
213
│ │ │ +
217
│ │ │ +
│ │ │ +
223 inline static std::pair<size_t, size_t> translationInterval() {
│ │ │ +
224 return std::make_pair(3, 5);
│ │ │ +
225 }
│ │ │ +
│ │ │ +
226
│ │ │ +
228
│ │ │ +
229private:
│ │ │ +
230
│ │ │ +
232 friend class boost::serialization::access;
│ │ │ +
233 template<class Archive>
│ │ │ +
234 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ +
235 ar & BOOST_SERIALIZATION_NVP(pose_);
│ │ │ +
236 }
│ │ │ +
237};
│ │ │ +
│ │ │ +
238// end of class PinholeBase
│ │ │ +
239
│ │ │ +
│ │ │ +
247class GTSAM_EXPORT CalibratedCamera: public PinholeBase {
│ │ │ +
248
│ │ │ +
249public:
│ │ │ +
250
│ │ │ +
251 enum {
│ │ │ +
252 dimension = 6
│ │ │ +
253 };
│ │ │ +
254
│ │ │ +
257
│ │ │ +
│ │ │ + │ │ │ +
260 }
│ │ │ +
│ │ │ +
261
│ │ │ +
│ │ │ +
263 explicit CalibratedCamera(const Pose3& pose) :
│ │ │ +
264 PinholeBase(pose) {
│ │ │ +
265 }
│ │ │ +
│ │ │ +
266
│ │ │ +
270
│ │ │ +
271 // Create CalibratedCamera, with derivatives
│ │ │ +
272 static CalibratedCamera Create(const Pose3& pose,
│ │ │ +
273 OptionalJacobian<dimension, 6> H1 = boost::none) {
│ │ │ +
274 if (H1)
│ │ │ +
275 *H1 << I_6x6;
│ │ │ +
276 return CalibratedCamera(pose);
│ │ │ +
277 }
│ │ │ +
278
│ │ │ +
285 static CalibratedCamera Level(const Pose2& pose2, double height);
│ │ │ +
286
│ │ │ +
295 static CalibratedCamera Lookat(const Point3& eye, const Point3& target,
│ │ │ +
296 const Point3& upVector);
│ │ │ +
297
│ │ │ +
301
│ │ │ +
│ │ │ +
303 explicit CalibratedCamera(const Vector &v) :
│ │ │ +
304 PinholeBase(v) {
│ │ │ +
305 }
│ │ │ +
│ │ │ +
306
│ │ │ +
310
│ │ │ +
│ │ │ + │ │ │ +
313 }
│ │ │ +
│ │ │ +
314
│ │ │ +
318
│ │ │ +
320 CalibratedCamera retract(const Vector& d) const;
│ │ │
321
│ │ │ -
│ │ │ - │ │ │ -
324 return Eigen::Matrix<double,traits<Point2>::dimension,1>::Constant(2.0 * K_.fx());;
│ │ │ -
325 }
│ │ │ -
│ │ │ -
326
│ │ │ -
327private:
│ │ │ -
328
│ │ │ - │ │ │ -
331 template<class Archive>
│ │ │ -
332 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ -
333 ar
│ │ │ -
334 & boost::serialization::make_nvp("PinholeBaseK",
│ │ │ -
335 boost::serialization::base_object<Base>(*this));
│ │ │ -
336 ar & BOOST_SERIALIZATION_NVP(K_);
│ │ │ -
337 }
│ │ │ -
338
│ │ │ -
339public:
│ │ │ - │ │ │ -
341};
│ │ │ -
│ │ │ -
342
│ │ │ -
343// manifold traits
│ │ │ -
344
│ │ │ -
345template <typename Calibration>
│ │ │ -
│ │ │ -
346struct traits<PinholeCamera<Calibration> >
│ │ │ -
347 : public internal::Manifold<PinholeCamera<Calibration> > {};
│ │ │ -
│ │ │ -
348
│ │ │ -
349template <typename Calibration>
│ │ │ -
│ │ │ -
350struct traits<const PinholeCamera<Calibration> >
│ │ │ -
351 : public internal::Manifold<PinholeCamera<Calibration> > {};
│ │ │ -
│ │ │ -
352
│ │ │ -
353// range traits, used in RangeFactor
│ │ │ -
354template <typename Calibration, typename T>
│ │ │ -
355struct Range<PinholeCamera<Calibration>, T> : HasRange<PinholeCamera<Calibration>, T, double> {};
│ │ │ +
323 Vector localCoordinates(const CalibratedCamera& T2) const;
│ │ │ +
324
│ │ │ +
│ │ │ +
326 void print(const std::string& s = "CalibratedCamera") const override {
│ │ │ +
327 PinholeBase::print(s);
│ │ │ +
328 }
│ │ │ +
│ │ │ +
329
│ │ │ +
│ │ │ +
331 inline size_t dim() const {
│ │ │ +
332 return dimension;
│ │ │ +
333 }
│ │ │ +
│ │ │ +
334
│ │ │ +
│ │ │ +
336 inline static size_t Dim() {
│ │ │ +
337 return dimension;
│ │ │ +
338 }
│ │ │ +
│ │ │ +
339
│ │ │ +
343
│ │ │ +
348 Point2 project(const Point3& point, OptionalJacobian<2, 6> Dcamera =
│ │ │ +
349 boost::none, OptionalJacobian<2, 3> Dpoint = boost::none) const;
│ │ │ +
350
│ │ │ +
│ │ │ +
352 Point3 backproject(const Point2& pn, double depth,
│ │ │ +
353 OptionalJacobian<3, 6> Dresult_dpose = boost::none,
│ │ │ +
354 OptionalJacobian<3, 2> Dresult_dp = boost::none,
│ │ │ +
355 OptionalJacobian<3, 1> Dresult_ddepth = boost::none) const {
│ │ │
356
│ │ │ -
357} // \ gtsam
│ │ │ -
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ -
Pinhole camera with known calibration.
│ │ │ -
Bearing-Range product.
│ │ │ +
357 Matrix32 Dpoint_dpn;
│ │ │ +
358 Matrix31 Dpoint_ddepth;
│ │ │ +
359 const Point3 point = BackprojectFromCamera(pn, depth,
│ │ │ +
360 Dresult_dp ? &Dpoint_dpn : 0,
│ │ │ +
361 Dresult_ddepth ? &Dpoint_ddepth : 0);
│ │ │ +
362
│ │ │ +
363 Matrix33 Dresult_dpoint;
│ │ │ +
364 const Point3 result = pose().transformFrom(point, Dresult_dpose,
│ │ │ +
365 (Dresult_ddepth ||
│ │ │ +
366 Dresult_dp) ? &Dresult_dpoint : 0);
│ │ │ +
367
│ │ │ +
368 if (Dresult_dp)
│ │ │ +
369 *Dresult_dp = Dresult_dpoint * Dpoint_dpn;
│ │ │ +
370 if (Dresult_ddepth)
│ │ │ +
371 *Dresult_ddepth = Dresult_dpoint * Dpoint_ddepth;
│ │ │ +
372
│ │ │ +
373 return result;
│ │ │ +
374 }
│ │ │ +
│ │ │ +
375
│ │ │ +
│ │ │ +
381 double range(const Point3& point,
│ │ │ +
382 OptionalJacobian<1, 6> Dcamera = boost::none,
│ │ │ +
383 OptionalJacobian<1, 3> Dpoint = boost::none) const {
│ │ │ +
384 return pose().range(point, Dcamera, Dpoint);
│ │ │ +
385 }
│ │ │ +
│ │ │ +
386
│ │ │ +
│ │ │ +
392 double range(const Pose3& pose, OptionalJacobian<1, 6> Dcamera = boost::none,
│ │ │ +
393 OptionalJacobian<1, 6> Dpose = boost::none) const {
│ │ │ +
394 return this->pose().range(pose, Dcamera, Dpose);
│ │ │ +
395 }
│ │ │ +
│ │ │ +
396
│ │ │ +
│ │ │ +
402 double range(const CalibratedCamera& camera, //
│ │ │ +
403 OptionalJacobian<1, 6> H1 = boost::none, //
│ │ │ +
404 OptionalJacobian<1, 6> H2 = boost::none) const {
│ │ │ +
405 return pose().range(camera.pose(), H1, H2);
│ │ │ +
406 }
│ │ │ +
│ │ │ +
407
│ │ │ +
409
│ │ │ +
410private:
│ │ │ +
411
│ │ │ +
414
│ │ │ +
416 friend class boost::serialization::access;
│ │ │ +
417 template<class Archive>
│ │ │ +
418 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ +
419 ar
│ │ │ +
420 & boost::serialization::make_nvp("PinholeBase",
│ │ │ +
421 boost::serialization::base_object<PinholeBase>(*this));
│ │ │ +
422 }
│ │ │ +
423
│ │ │ +
425};
│ │ │ +
│ │ │ +
426
│ │ │ +
427// manifold traits
│ │ │ +
428template <>
│ │ │ +
429struct traits<CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
│ │ │ +
430
│ │ │ +
431template <>
│ │ │ +
432struct traits<const CalibratedCamera> : public internal::Manifold<CalibratedCamera> {};
│ │ │ +
433
│ │ │ +
434// range traits, used in RangeFactor
│ │ │ +
435template <typename T>
│ │ │ +
436struct Range<CalibratedCamera, T> : HasRange<CalibratedCamera, T, double> {};
│ │ │ +
437
│ │ │ +
438} // namespace gtsam
│ │ │ +
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
Bearing-Range product.
│ │ │ +
3D Pose
│ │ │ +
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
│ │ │
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
│ │ │ -
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
│ │ │ -
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
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
Base exception type that uses tbb_allocator if GTSAM is compiled with TBB.
Definition ThreadsafeException.h:42
│ │ │
Definition BearingRange.h:40
│ │ │
Definition BearingRange.h:194
│ │ │ -
static Matrix26 Dpose(const Point2 &pn, double d)
Calculate Jacobian with respect to pose.
Definition CalibratedCamera.cpp:27
│ │ │ -
virtual void print(const std::string &s="PinholeBase") const
print
Definition CalibratedCamera.cpp:74
│ │ │ +
Definition CalibratedCamera.h:32
│ │ │ +
A pinhole camera class that has a Pose3, functions as base class for all pinhole cameras.
Definition CalibratedCamera.h:52
│ │ │ +
PinholeBase()
Default constructor.
Definition CalibratedCamera.h:123
│ │ │ +
PinholeBase(const Pose3 &pose)
Constructor with pose.
Definition CalibratedCamera.h:126
│ │ │ +
const Point3 & translation() const
get translation
Definition CalibratedCamera.h:162
│ │ │ +
const Rot3 & rotation() const
get rotation
Definition CalibratedCamera.h:157
│ │ │ +
Point2 Measurement
Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes...
Definition CalibratedCamera.h:64
│ │ │
const Pose3 & pose() const
return pose, constant version
Definition CalibratedCamera.h:152
│ │ │ -
static Pose3 LevelPose(const Pose2 &pose2, double height)
Create a level pose at the given 2D pose and height.
Definition CalibratedCamera.cpp:49
│ │ │ -
bool equals(const PinholeBase &camera, double tol=1e-9) const
assert equality up to a tolerance
Definition CalibratedCamera.cpp:69
│ │ │ -
static Matrix23 Dpoint(const Point2 &pn, double d, const Matrix3 &Rt)
Calculate Jacobian with respect to point.
Definition CalibratedCamera.cpp:37
│ │ │ -
static Pose3 LookatPose(const Point3 &eye, const Point3 &target, const Point3 &upVector)
Create a camera pose at the given eye position looking at a target point in the scene with the specif...
Definition CalibratedCamera.cpp:58
│ │ │ +
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 CalibratedCamera.h:223
│ │ │ +
Rot3 Rotation
Pose Concept requirements.
Definition CalibratedCamera.h:57
│ │ │ +
virtual ~PinholeBase()=default
Default destructor.
│ │ │
A Calibrated camera class [R|-R't], calibration K=I.
Definition CalibratedCamera.h:247
│ │ │ -
A pinhole camera class that has a Pose3 and a Calibration.
Definition PinholeCamera.h:33
│ │ │ -
void print(const std::string &s="PinholeCamera") const override
print
Definition PinholeCamera.h:151
│ │ │ -
Point2 _project2(const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const
Templated projection of a 3D point or a point at infinity into the image.
Definition PinholeCamera.h:230
│ │ │ -
Vector defaultErrorWhenTriangulatingBehindCamera() const
for Nonlinear Triangulation
Definition PinholeCamera.h:323
│ │ │ -
const Calibration & calibration() const override
return calibration
Definition PinholeCamera.h:178
│ │ │ -
const Pose3 & getPose(OptionalJacobian< 6, dimension > H) const
return pose, with derivative
Definition PinholeCamera.h:169
│ │ │ -
Point2 project2(const Point3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
project a 3D point from world coordinates into the image
Definition PinholeCamera.h:245
│ │ │ -
PinholeCamera(const Pose3 &pose)
constructor with pose
Definition PinholeCamera.h:66
│ │ │ -
static PinholeCamera Level(const Pose2 &pose2, double height)
PinholeCamera::level with default calibration.
Definition PinholeCamera.h:92
│ │ │ -
PinholeCamera(const Pose3 &pose, const Calibration &K)
constructor with pose and calibration
Definition PinholeCamera.h:71
│ │ │ -
static PinholeCamera Level(const Calibration &K, const Pose2 &pose2, double height)
Create a level camera at the given 2D pose and height.
Definition PinholeCamera.h:86
│ │ │ -
size_t dim() const
Definition PinholeCamera.h:187
│ │ │ -
static PinholeCamera Identity()
for Canonical
Definition PinholeCamera.h:216
│ │ │ -
static size_t Dim()
Definition PinholeCamera.h:192
│ │ │ -
bool equals(const Base &camera, double tol=1e-9) const
assert equality up to a tolerance
Definition PinholeCamera.h:145
│ │ │ -
double range(const Pose3 &pose, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const
Calculate range to another pose.
Definition PinholeCamera.h:275
│ │ │ -
double range(const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6+CalibrationB::dimension > Dother=boost::none) const
Calculate range to another camera.
Definition PinholeCamera.h:290
│ │ │ -
PinholeCamera(const Vector &v, const Vector &K)
Init from Vector and calibration.
Definition PinholeCamera.h:136
│ │ │ -
static PinholeCamera Lookat(const Point3 &eye, const Point3 &target, const Point3 &upVector, const Calibration &K=Calibration())
Create a camera at the given eye position looking at a target point in the scene with the specified u...
Definition PinholeCamera.h:105
│ │ │ -
Matrix34 cameraProjectionMatrix() const
for Linear Triangulation
Definition PinholeCamera.h:318
│ │ │ -
VectorK6 localCoordinates(const PinholeCamera &T2) const
return canonical coordinate
Definition PinholeCamera.h:208
│ │ │ -
PinholeCamera retract(const Vector &d) const
move a cameras according to d
Definition PinholeCamera.h:199
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition PinholeCamera.h:330
│ │ │ -
Point2 project2(const Unit3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
project a point at infinity from world coordinates into the image
Definition PinholeCamera.h:251
│ │ │ -
const Pose3 & pose() const
return pose
Definition PinholeCamera.h:164
│ │ │ -
PinholeCamera(const Vector &v)
Init from vector, can be 6D (default calibration) or dim.
Definition PinholeCamera.h:129
│ │ │ -
PinholeCamera()
default constructor
Definition PinholeCamera.h:62
│ │ │ -
Point2 Measurement
Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes...
Definition PinholeCamera.h:41
│ │ │ -
double range(const CalibratedCamera &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const
Calculate range to a calibrated camera.
Definition PinholeCamera.h:311
│ │ │ -
double range(const Point3 &point, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const
Calculate range to a landmark.
Definition PinholeCamera.h:261
│ │ │ -
A pinhole camera class that has a Pose3 and a fixed Calibration.
Definition PinholePose.h:34
│ │ │ -
Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none, OptionalJacobian< 2, DimK > Dcal=boost::none) const
project a 3D point from world coordinates into the image
Definition PinholePose.h:118
│ │ │ +
Point3 backproject(const Point2 &pn, double depth, OptionalJacobian< 3, 6 > Dresult_dpose=boost::none, OptionalJacobian< 3, 2 > Dresult_dp=boost::none, OptionalJacobian< 3, 1 > Dresult_ddepth=boost::none) const
backproject a 2-dimensional point to a 3-dimensional point at given depth
Definition CalibratedCamera.h:352
│ │ │ +
CalibratedCamera()
default constructor
Definition CalibratedCamera.h:259
│ │ │ +
double range(const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const
Calculate range to another pose.
Definition CalibratedCamera.h:392
│ │ │ +
size_t dim() const
Definition CalibratedCamera.h:331
│ │ │ +
CalibratedCamera(const Vector &v)
construct from vector
Definition CalibratedCamera.h:303
│ │ │ +
virtual ~CalibratedCamera()
destructor
Definition CalibratedCamera.h:312
│ │ │ +
static size_t Dim()
Definition CalibratedCamera.h:336
│ │ │ +
double range(const CalibratedCamera &camera, OptionalJacobian< 1, 6 > H1=boost::none, OptionalJacobian< 1, 6 > H2=boost::none) const
Calculate range to another camera.
Definition CalibratedCamera.h:402
│ │ │ +
void print(const std::string &s="CalibratedCamera") const override
print
Definition CalibratedCamera.h:326
│ │ │ +
double range(const Point3 &point, OptionalJacobian< 1, 6 > Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const
Calculate range to a landmark.
Definition CalibratedCamera.h:381
│ │ │ +
CalibratedCamera(const Pose3 &pose)
construct with pose
Definition CalibratedCamera.h:263
│ │ │
A 2D pose (Point2,Rot2)
Definition Pose2.h:36
│ │ │
A 3D pose (R,t) : (Rot3,Point3)
Definition Pose3.h:37
│ │ │ +
Point3 transformFrom(const Point3 &point, OptionalJacobian< 3, 6 > Hself=boost::none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const
takes point in Pose coordinates and transforms it to world coordinates
Definition Pose3.cpp:347
│ │ │
double range(const Point3 &point, OptionalJacobian< 1, 6 > Hself=boost::none, OptionalJacobian< 1, 3 > Hpoint=boost::none) const
Calculate range to a landmark.
Definition Pose3.cpp:399
│ │ │ -
Matrix4 matrix() const
convert to 4*4 matrix
Definition Pose3.cpp:323
│ │ │ -
Pose3 inverse() const
inverse transformation with derivatives
Definition Pose3.cpp:49
│ │ │ +
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
Definition Pose3.cpp:308
│ │ │ +
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation
Definition Pose3.cpp:315
│ │ │ +
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Definition Rot3.h:58
│ │ │
Represents a 3D point on a unit sphere.
Definition Unit3.h:43
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -PinholeCamera.h │ │ │ │ +CalibratedCamera.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,498 +16,445 @@ │ │ │ │ 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_i_n_h_o_l_e_P_o_s_e_._h> │ │ │ │ -22#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> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -32template │ │ │ │ -_3_3class _P_i_n_h_o_l_e_C_a_m_e_r_a: public _P_i_n_h_o_l_e_B_a_s_e_K { │ │ │ │ -34 │ │ │ │ -35public: │ │ │ │ +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_/_P_o_i_n_t_2_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ +24#include │ │ │ │ +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_/_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h> │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +_3_2class GTSAM_EXPORT _C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n: public │ │ │ │ +_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n { │ │ │ │ +33public: │ │ │ │ +34 _C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n() │ │ │ │ +35 : _C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(std::numeric_limits::max()) {} │ │ │ │ 36 │ │ │ │ -_4_1 typedef _P_o_i_n_t_2 _M_e_a_s_u_r_e_m_e_n_t; │ │ │ │ -42 typedef Point2Vector MeasurementVector; │ │ │ │ -43 │ │ │ │ -44private: │ │ │ │ -45 │ │ │ │ -46 typedef _P_i_n_h_o_l_e_B_a_s_e_K_<_C_a_l_i_b_r_a_t_i_o_n_> _B_a_s_e; │ │ │ │ -47 Calibration K_; │ │ │ │ -48 │ │ │ │ -49 // Get dimensions of calibration type at compile time │ │ │ │ -50 static const int DimK = _F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_C_a_l_i_b_r_a_t_i_o_n_>_:_:_v_a_l_u_e; │ │ │ │ -51 │ │ │ │ -52public: │ │ │ │ +37 _C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n(_K_e_y j) │ │ │ │ +38 : _T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_<_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n_>("CheiralityException"), │ │ │ │ +39 j_(j) {} │ │ │ │ +40 │ │ │ │ +41 _K_e_y nearbyVariable() const {return j_;} │ │ │ │ +42 │ │ │ │ +43private: │ │ │ │ +44 _K_e_y j_; │ │ │ │ +45}; │ │ │ │ +46 │ │ │ │ +_5_2class GTSAM_EXPORT _P_i_n_h_o_l_e_B_a_s_e { │ │ │ │ 53 │ │ │ │ -54 enum { │ │ │ │ -55 dimension = 6 + DimK │ │ │ │ -56 }; │ │ │ │ -57 │ │ │ │ -60 │ │ │ │ -_6_2 _P_i_n_h_o_l_e_C_a_m_e_r_a() { │ │ │ │ -63 } │ │ │ │ -64 │ │ │ │ -_6_6 explicit _P_i_n_h_o_l_e_C_a_m_e_r_a(const _P_o_s_e_3& _p_o_s_e) : │ │ │ │ -67 _B_a_s_e(_p_o_s_e) { │ │ │ │ -68 } │ │ │ │ -69 │ │ │ │ -_7_1 _P_i_n_h_o_l_e_C_a_m_e_r_a(const _P_o_s_e_3& _p_o_s_e, const Calibration& K) : │ │ │ │ -72 _B_a_s_e(_p_o_s_e), K_(K) { │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -78 │ │ │ │ -_8_6 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_e_v_e_l(const Calibration &K, const _P_o_s_e_2& pose2, │ │ │ │ -87 double height) { │ │ │ │ -88 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_B_a_s_e_:_:_L_e_v_e_l_P_o_s_e(pose2, height), K); │ │ │ │ -89 } │ │ │ │ +54public: │ │ │ │ +55 │ │ │ │ +_5_7 typedef _R_o_t_3 _R_o_t_a_t_i_o_n; │ │ │ │ +58 typedef _P_o_i_n_t_3 Translation; │ │ │ │ +59 │ │ │ │ +_6_4 typedef _P_o_i_n_t_2 _M_e_a_s_u_r_e_m_e_n_t; │ │ │ │ +65 typedef Point2Vector MeasurementVector; │ │ │ │ +66 │ │ │ │ +67private: │ │ │ │ +68 │ │ │ │ +69 _P_o_s_e_3 pose_; │ │ │ │ +70 │ │ │ │ +71protected: │ │ │ │ +72 │ │ │ │ +75 │ │ │ │ +81 static Matrix26 Dpose(const _P_o_i_n_t_2& pn, double d); │ │ │ │ +82 │ │ │ │ +89 static Matrix23 Dpoint(const _P_o_i_n_t_2& pn, double d, const Matrix3& Rt); │ │ │ │ 90 │ │ │ │ -_9_2 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_e_v_e_l(const _P_o_s_e_2& pose2, double height) { │ │ │ │ -93 return _P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l(Calibration(), pose2, height); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -_1_0_5 static _P_i_n_h_o_l_e_C_a_m_e_r_a _L_o_o_k_a_t(const _P_o_i_n_t_3& eye, const _P_o_i_n_t_3& target, │ │ │ │ -106 const _P_o_i_n_t_3& upVector, const Calibration& K = Calibration()) { │ │ │ │ -107 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_B_a_s_e_:_:_L_o_o_k_a_t_P_o_s_e(eye, target, upVector), K); │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -110 // Create PinholeCamera, with derivatives │ │ │ │ -111 static _P_i_n_h_o_l_e_C_a_m_e_r_a Create(const _P_o_s_e_3& _p_o_s_e, const Calibration &K, │ │ │ │ -112 _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_,_ _6_> H1 = boost::none, // │ │ │ │ -113 _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_K_> H2 = boost::none) { │ │ │ │ -114 typedef Eigen::Matrix MatrixK6; │ │ │ │ -115 if (H1) │ │ │ │ -116 *H1 << I_6x6, MatrixK6::Zero(); │ │ │ │ -117 typedef Eigen::Matrix Matrix6K; │ │ │ │ -118 typedef Eigen::Matrix MatrixK; │ │ │ │ -119 if (H2) │ │ │ │ -120 *H2 << Matrix6K::Zero(), MatrixK::Identity(); │ │ │ │ -121 return _P_i_n_h_o_l_e_C_a_m_e_r_a(_p_o_s_e,K); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ +92 │ │ │ │ +93public: │ │ │ │ +94 │ │ │ │ +97 │ │ │ │ +105 static _P_o_s_e_3 LevelPose(const _P_o_s_e_2& pose2, double height); │ │ │ │ +106 │ │ │ │ +115 static _P_o_s_e_3 LookatPose(const _P_o_i_n_t_3& eye, const _P_o_i_n_t_3& target, │ │ │ │ +116 const _P_o_i_n_t_3& upVector); │ │ │ │ +117 │ │ │ │ +121 │ │ │ │ +_1_2_3 _P_i_n_h_o_l_e_B_a_s_e() {} │ │ │ │ +124 │ │ │ │ +_1_2_6 explicit _P_i_n_h_o_l_e_B_a_s_e(const _P_o_s_e_3& pose) : pose_(pose) {} │ │ │ │ 127 │ │ │ │ -_1_2_9 explicit _P_i_n_h_o_l_e_C_a_m_e_r_a(const Vector &v) : │ │ │ │ -130 _B_a_s_e(v.head<6>()) { │ │ │ │ -131 if (v.size() > 6) │ │ │ │ -132 K_ = Calibration(v.tail()); │ │ │ │ -133 } │ │ │ │ -134 │ │ │ │ -_1_3_6 _P_i_n_h_o_l_e_C_a_m_e_r_a(const Vector &v, const Vector &K) : │ │ │ │ -137 _B_a_s_e(v), K_(K) { │ │ │ │ -138 } │ │ │ │ -139 │ │ │ │ +131 │ │ │ │ +132 explicit _P_i_n_h_o_l_e_B_a_s_e(const Vector& v) : pose_(_P_o_s_e_3::Expmap(v)) {} │ │ │ │ +133 │ │ │ │ +_1_3_5 virtual _~_P_i_n_h_o_l_e_B_a_s_e() = default; │ │ │ │ +136 │ │ │ │ +140 │ │ │ │ +142 bool _e_q_u_a_l_s(const _P_i_n_h_o_l_e_B_a_s_e &camera, double tol = 1e-9) const; │ │ │ │ 143 │ │ │ │ -_1_4_5 bool _e_q_u_a_l_s(const _B_a_s_e &camera, double tol = 1e-9) const { │ │ │ │ -146 const _P_i_n_h_o_l_e_C_a_m_e_r_a* e = dynamic_cast(&camera); │ │ │ │ -147 return _B_a_s_e_:_:_e_q_u_a_l_s(camera, tol) && K_._e_q_u_a_l_s(e->_c_a_l_i_b_r_a_t_i_o_n(), tol); │ │ │ │ -148 } │ │ │ │ -149 │ │ │ │ -_1_5_1 void _p_r_i_n_t(const std::string& s = "PinholeCamera") const override { │ │ │ │ -152 _B_a_s_e_:_:_p_r_i_n_t(s); │ │ │ │ -153 K_.print(s + ".calibration"); │ │ │ │ +145 virtual void _p_r_i_n_t(const std::string& s = "PinholeBase") const; │ │ │ │ +146 │ │ │ │ +150 │ │ │ │ +_1_5_2 const _P_o_s_e_3& _p_o_s_e() const { │ │ │ │ +153 return pose_; │ │ │ │ 154 } │ │ │ │ 155 │ │ │ │ -159 │ │ │ │ -160 _~_P_i_n_h_o_l_e_C_a_m_e_r_a() override { │ │ │ │ -161 } │ │ │ │ -162 │ │ │ │ -_1_6_4 const _P_o_s_e_3& _p_o_s_e() const { │ │ │ │ -165 return _B_a_s_e_:_:_p_o_s_e(); │ │ │ │ -166 } │ │ │ │ -167 │ │ │ │ -_1_6_9 const _P_o_s_e_3& _g_e_t_P_o_s_e(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _d_i_m_e_n_s_i_o_n_> H) const { │ │ │ │ -170 if (H) { │ │ │ │ -171 H->setZero(); │ │ │ │ -172 H->template block<6, 6>(0, 0) = I_6x6; │ │ │ │ -173 } │ │ │ │ -174 return _B_a_s_e_:_:_p_o_s_e(); │ │ │ │ -175 } │ │ │ │ -176 │ │ │ │ -_1_7_8 const Calibration& _c_a_l_i_b_r_a_t_i_o_n() const override { │ │ │ │ -179 return K_; │ │ │ │ -180 } │ │ │ │ -181 │ │ │ │ -185 │ │ │ │ -_1_8_7 size_t _d_i_m() const { │ │ │ │ -188 return dimension; │ │ │ │ -189 } │ │ │ │ -190 │ │ │ │ -_1_9_2 static size_t _D_i_m() { │ │ │ │ -193 return dimension; │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -196 typedef Eigen::Matrix VectorK6; │ │ │ │ -197 │ │ │ │ -_1_9_9 _P_i_n_h_o_l_e_C_a_m_e_r_a _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ -200 if ((size_t) d.size() == 6) │ │ │ │ -201 return _P_i_n_h_o_l_e_C_a_m_e_r_a(this->_p_o_s_e()._r_e_t_r_a_c_t(d), _c_a_l_i_b_r_a_t_i_o_n()); │ │ │ │ -202 else │ │ │ │ -203 return _P_i_n_h_o_l_e_C_a_m_e_r_a(this->_p_o_s_e()._r_e_t_r_a_c_t(d.head<6>()), │ │ │ │ -204 _c_a_l_i_b_r_a_t_i_o_n()._r_e_t_r_a_c_t(d.tail(_c_a_l_i_b_r_a_t_i_o_n()._d_i_m()))); │ │ │ │ -205 } │ │ │ │ -206 │ │ │ │ -_2_0_8 VectorK6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _P_i_n_h_o_l_e_C_a_m_e_r_a& T2) const { │ │ │ │ -209 VectorK6 d; │ │ │ │ -210 d.template head<6>() = this->_p_o_s_e()._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(T2._p_o_s_e()); │ │ │ │ -211 d.template tail() = _c_a_l_i_b_r_a_t_i_o_n().localCoordinates(T2._c_a_l_i_b_r_a_t_i_o_n()); │ │ │ │ -212 return d; │ │ │ │ -213 } │ │ │ │ -214 │ │ │ │ -_2_1_6 static _P_i_n_h_o_l_e_C_a_m_e_r_a _I_d_e_n_t_i_t_y() { │ │ │ │ -217 return _P_i_n_h_o_l_e_C_a_m_e_r_a(); // assumes that the default constructor is valid │ │ │ │ -218 } │ │ │ │ -219 │ │ │ │ -223 │ │ │ │ -224 typedef Eigen::Matrix Matrix2K; │ │ │ │ -225 │ │ │ │ -229 template │ │ │ │ -_2_3_0 _P_o_i_n_t_2 ___p_r_o_j_e_c_t_2(const POINT& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera, │ │ │ │ -231 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n<2, _F_i_x_e_d_D_i_m_e_n_s_i_o_n_<_P_O_I_N_T_>_:_:_v_a_l_u_e> _D_p_o_i_n_t) const { │ │ │ │ -232 // We just call 3-derivative version in Base │ │ │ │ -233 if (Dcamera){ │ │ │ │ -234 Matrix26 _D_p_o_s_e; │ │ │ │ -235 Eigen::Matrix Dcal; │ │ │ │ -236 const _P_o_i_n_t_2 pi = _B_a_s_e_:_:_p_r_o_j_e_c_t(pw, _D_p_o_s_e, _D_p_o_i_n_t, Dcal); │ │ │ │ -237 *Dcamera << _D_p_o_s_e, Dcal; │ │ │ │ -238 return pi; │ │ │ │ -239 } else { │ │ │ │ -240 return _B_a_s_e_:_:_p_r_o_j_e_c_t(pw, boost::none, _D_p_o_i_n_t, boost::none); │ │ │ │ -241 } │ │ │ │ -242 } │ │ │ │ -243 │ │ │ │ -_2_4_5 _P_o_i_n_t_2 _p_r_o_j_e_c_t_2(const _P_o_i_n_t_3& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ -246 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ -247 return ___p_r_o_j_e_c_t_2(pw, Dcamera, _D_p_o_i_n_t); │ │ │ │ -248 } │ │ │ │ -249 │ │ │ │ -_2_5_1 _P_o_i_n_t_2 _p_r_o_j_e_c_t_2(const _U_n_i_t_3& pw, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ -252 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ -253 return ___p_r_o_j_e_c_t_2(pw, Dcamera, _D_p_o_i_n_t); │ │ │ │ -254 } │ │ │ │ -255 │ │ │ │ -_2_6_1 double _r_a_n_g_e(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ -262 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> _D_p_o_i_n_t = boost::none) const { │ │ │ │ -263 Matrix16 Dpose_; │ │ │ │ -264 double result = this->_p_o_s_e()._r_a_n_g_e(point, Dcamera ? &Dpose_ : 0, _D_p_o_i_n_t); │ │ │ │ -265 if (Dcamera) │ │ │ │ -266 *Dcamera << Dpose_, Eigen::Matrix::Zero(); │ │ │ │ -267 return result; │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -_2_7_5 double _r_a_n_g_e(const _P_o_s_e_3& _p_o_s_e, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = │ │ │ │ -276 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> _D_p_o_s_e = boost::none) const { │ │ │ │ -277 Matrix16 Dpose_; │ │ │ │ -278 double result = this->_p_o_s_e()._r_a_n_g_e(pose, Dcamera ? &Dpose_ : 0, _D_p_o_s_e); │ │ │ │ -279 if (Dcamera) │ │ │ │ -280 *Dcamera << Dpose_, Eigen::Matrix::Zero(); │ │ │ │ -281 return result; │ │ │ │ -282 } │ │ │ │ -283 │ │ │ │ -289 template │ │ │ │ -_2_9_0 double _r_a_n_g_e(const _P_i_n_h_o_l_e_C_a_m_e_r_a_<_C_a_l_i_b_r_a_t_i_o_n_B_>& camera, │ │ │ │ -291 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = boost::none, │ │ │ │ -292 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_ _+_ _C_a_l_i_b_r_a_t_i_o_n_B_:_:_d_i_m_e_n_s_i_o_n_> Dother = boost::none) │ │ │ │ -const { │ │ │ │ -293 Matrix16 Dcamera_, Dother_; │ │ │ │ -294 double result = this->_p_o_s_e()._r_a_n_g_e(camera._p_o_s_e(), Dcamera ? &Dcamera_ : 0, │ │ │ │ -295 Dother ? &Dother_ : 0); │ │ │ │ -296 if (Dcamera) { │ │ │ │ -297 *Dcamera << Dcamera_, Eigen::Matrix::Zero(); │ │ │ │ -298 } │ │ │ │ -299 if (Dother) { │ │ │ │ -300 Dother->setZero(); │ │ │ │ -301 Dother->template block<1, 6>(0, 0) = Dother_; │ │ │ │ -302 } │ │ │ │ -303 return result; │ │ │ │ -304 } │ │ │ │ -305 │ │ │ │ -_3_1_1 double _r_a_n_g_e(const _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a& camera, │ │ │ │ -312 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _d_i_m_e_n_s_i_o_n_> Dcamera = boost::none, │ │ │ │ -313 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Dother = boost::none) const { │ │ │ │ -314 return _r_a_n_g_e(camera._p_o_s_e(), Dcamera, Dother); │ │ │ │ -315 } │ │ │ │ -316 │ │ │ │ -_3_1_8 Matrix34 _c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x() const { │ │ │ │ -319 return K_.K() * _P_i_n_h_o_l_e_B_a_s_e_:_:_p_o_s_e()._i_n_v_e_r_s_e()._m_a_t_r_i_x().block(0, 0, 3, 4); │ │ │ │ -320 } │ │ │ │ +_1_5_7 const _R_o_t_3& _r_o_t_a_t_i_o_n() const { │ │ │ │ +158 return pose_._r_o_t_a_t_i_o_n(); │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +_1_6_2 const _P_o_i_n_t_3& _t_r_a_n_s_l_a_t_i_o_n() const { │ │ │ │ +163 return pose_._t_r_a_n_s_l_a_t_i_o_n(); │ │ │ │ +164 } │ │ │ │ +165 │ │ │ │ +167 const _P_o_s_e_3& getPose(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H) const; │ │ │ │ +168 │ │ │ │ +172 │ │ │ │ +178 static _P_o_i_n_t_2 Project(const _P_o_i_n_t_3& pc, // │ │ │ │ +179 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none); │ │ │ │ +180 │ │ │ │ +186 static _P_o_i_n_t_2 Project(const _U_n_i_t_3& pc, // │ │ │ │ +187 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dpoint = boost::none); │ │ │ │ +188 │ │ │ │ +190 std::pair projectSafe(const _P_o_i_n_t_3& pw) const; │ │ │ │ +191 │ │ │ │ +197 _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_<_2_,_ _6_> Dpose = │ │ │ │ +198 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none) const; │ │ │ │ +199 │ │ │ │ +205 _P_o_i_n_t_2 project2(const _U_n_i_t_3& point, │ │ │ │ +206 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Dpose = boost::none, │ │ │ │ +207 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dpoint = boost::none) const; │ │ │ │ +208 │ │ │ │ +210 static _P_o_i_n_t_3 BackprojectFromCamera(const _P_o_i_n_t_2& p, const double depth, │ │ │ │ +211 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _2_> Dpoint = boost::none, │ │ │ │ +212 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Ddepth = boost::none); │ │ │ │ +213 │ │ │ │ +217 │ │ │ │ +_2_2_3 inline static std::pair _t_r_a_n_s_l_a_t_i_o_n_I_n_t_e_r_v_a_l() { │ │ │ │ +224 return std::make_pair(3, 5); │ │ │ │ +225 } │ │ │ │ +226 │ │ │ │ +228 │ │ │ │ +229private: │ │ │ │ +230 │ │ │ │ +_2_3_2 friend class boost::serialization::access; │ │ │ │ +233 template │ │ │ │ +234 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +235 ar & BOOST_SERIALIZATION_NVP(pose_); │ │ │ │ +236 } │ │ │ │ +237}; │ │ │ │ +238// end of class PinholeBase │ │ │ │ +239 │ │ │ │ +_2_4_7class GTSAM_EXPORT _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a: public _P_i_n_h_o_l_e_B_a_s_e { │ │ │ │ +248 │ │ │ │ +249public: │ │ │ │ +250 │ │ │ │ +251 enum { │ │ │ │ +252 dimension = 6 │ │ │ │ +253 }; │ │ │ │ +254 │ │ │ │ +257 │ │ │ │ +_2_5_9 _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a() { │ │ │ │ +260 } │ │ │ │ +261 │ │ │ │ +_2_6_3 explicit _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a(const _P_o_s_e_3& pose) : │ │ │ │ +264 _P_i_n_h_o_l_e_B_a_s_e(pose) { │ │ │ │ +265 } │ │ │ │ +266 │ │ │ │ +270 │ │ │ │ +271 // Create CalibratedCamera, with derivatives │ │ │ │ +272 static _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a Create(const _P_o_s_e_3& pose, │ │ │ │ +273 _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_,_ _6_> H1 = boost::none) { │ │ │ │ +274 if (H1) │ │ │ │ +275 *H1 << I_6x6; │ │ │ │ +276 return _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a(pose); │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +285 static CalibratedCamera Level(const Pose2& pose2, double height); │ │ │ │ +286 │ │ │ │ +295 static CalibratedCamera Lookat(const Point3& eye, const Point3& target, │ │ │ │ +296 const Point3& upVector); │ │ │ │ +297 │ │ │ │ +301 │ │ │ │ +_3_0_3 explicit _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a(const Vector &v) : │ │ │ │ +304 _P_i_n_h_o_l_e_B_a_s_e(v) { │ │ │ │ +305 } │ │ │ │ +306 │ │ │ │ +310 │ │ │ │ +_3_1_2 virtual _~_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a() { │ │ │ │ +313 } │ │ │ │ +314 │ │ │ │ +318 │ │ │ │ +320 _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a retract(const Vector& d) const; │ │ │ │ 321 │ │ │ │ -_3_2_3 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 { │ │ │ │ -324 return Eigen::Matrix::dimension,1>::Constant(2.0 * │ │ │ │ -K_.fx());; │ │ │ │ -325 } │ │ │ │ -326 │ │ │ │ -327private: │ │ │ │ -328 │ │ │ │ -_3_3_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; │ │ │ │ -331 template │ │ │ │ -332 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ -333 ar │ │ │ │ -334 & boost::serialization::make_nvp("PinholeBaseK", │ │ │ │ -335 boost::serialization::base_object(*this)); │ │ │ │ -336 ar & BOOST_SERIALIZATION_NVP(K_); │ │ │ │ -337 } │ │ │ │ -338 │ │ │ │ -339public: │ │ │ │ -340 _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 │ │ │ │ -341}; │ │ │ │ -342 │ │ │ │ -343// manifold traits │ │ │ │ -344 │ │ │ │ -345template │ │ │ │ -_3_4_6struct _t_r_a_i_t_s<_P_i_n_h_o_l_e_C_a_m_e_r_a > │ │ │ │ -347 : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d > {}; │ │ │ │ -348 │ │ │ │ -349template │ │ │ │ -_3_5_0struct _t_r_a_i_t_s > │ │ │ │ -351 : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d > {}; │ │ │ │ -352 │ │ │ │ -353// range traits, used in RangeFactor │ │ │ │ -354template │ │ │ │ -_3_5_5struct _R_a_n_g_e<_P_i_n_h_o_l_e_C_a_m_e_r_a, T> : │ │ │ │ -_H_a_s_R_a_n_g_e, T, double> {}; │ │ │ │ +323 Vector localCoordinates(const _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a& T2) const; │ │ │ │ +324 │ │ │ │ +_3_2_6 void _p_r_i_n_t(const std::string& s = "CalibratedCamera") const override { │ │ │ │ +327 PinholeBase::print(s); │ │ │ │ +328 } │ │ │ │ +329 │ │ │ │ +_3_3_1 inline size_t _d_i_m() const { │ │ │ │ +332 return dimension; │ │ │ │ +333 } │ │ │ │ +334 │ │ │ │ +_3_3_6 inline static size_t _D_i_m() { │ │ │ │ +337 return dimension; │ │ │ │ +338 } │ │ │ │ +339 │ │ │ │ +343 │ │ │ │ +348 _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_<_2_,_ _6_> Dcamera = │ │ │ │ +349 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Dpoint = boost::none) const; │ │ │ │ +350 │ │ │ │ +_3_5_2 _P_o_i_n_t_3 _b_a_c_k_p_r_o_j_e_c_t(const _P_o_i_n_t_2& pn, double depth, │ │ │ │ +353 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> Dresult_dpose = boost::none, │ │ │ │ +354 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _2_> Dresult_dp = boost::none, │ │ │ │ +355 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _1_> Dresult_ddepth = boost::none) const { │ │ │ │ 356 │ │ │ │ -357} // \ gtsam │ │ │ │ -_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 │ │ │ │ -_P_i_n_h_o_l_e_P_o_s_e_._h │ │ │ │ -Pinhole camera with known calibration. │ │ │ │ +357 Matrix32 Dpoint_dpn; │ │ │ │ +358 Matrix31 Dpoint_ddepth; │ │ │ │ +359 const _P_o_i_n_t_3 point = BackprojectFromCamera(pn, depth, │ │ │ │ +360 Dresult_dp ? &Dpoint_dpn : 0, │ │ │ │ +361 Dresult_ddepth ? &Dpoint_ddepth : 0); │ │ │ │ +362 │ │ │ │ +363 Matrix33 Dresult_dpoint; │ │ │ │ +364 const _P_o_i_n_t_3 result = pose()._t_r_a_n_s_f_o_r_m_F_r_o_m(point, Dresult_dpose, │ │ │ │ +365 (Dresult_ddepth || │ │ │ │ +366 Dresult_dp) ? &Dresult_dpoint : 0); │ │ │ │ +367 │ │ │ │ +368 if (Dresult_dp) │ │ │ │ +369 *Dresult_dp = Dresult_dpoint * Dpoint_dpn; │ │ │ │ +370 if (Dresult_ddepth) │ │ │ │ +371 *Dresult_ddepth = Dresult_dpoint * Dpoint_ddepth; │ │ │ │ +372 │ │ │ │ +373 return result; │ │ │ │ +374 } │ │ │ │ +375 │ │ │ │ +_3_8_1 double _r_a_n_g_e(const _P_o_i_n_t_3& point, │ │ │ │ +382 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Dcamera = boost::none, │ │ │ │ +383 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> Dpoint = boost::none) const { │ │ │ │ +384 return pose()._r_a_n_g_e(point, Dcamera, Dpoint); │ │ │ │ +385 } │ │ │ │ +386 │ │ │ │ +_3_9_2 double _r_a_n_g_e(const _P_o_s_e_3& pose, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Dcamera = boost:: │ │ │ │ +none, │ │ │ │ +393 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Dpose = boost::none) const { │ │ │ │ +394 return this->pose()._r_a_n_g_e(pose, Dcamera, Dpose); │ │ │ │ +395 } │ │ │ │ +396 │ │ │ │ +_4_0_2 double _r_a_n_g_e(const _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a& camera, // │ │ │ │ +403 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> H1 = boost::none, // │ │ │ │ +404 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> H2 = boost::none) const { │ │ │ │ +405 return pose()._r_a_n_g_e(camera._p_o_s_e(), H1, H2); │ │ │ │ +406 } │ │ │ │ +407 │ │ │ │ +409 │ │ │ │ +410private: │ │ │ │ +411 │ │ │ │ +414 │ │ │ │ +_4_1_6 friend class boost::serialization::access; │ │ │ │ +417 template │ │ │ │ +418 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +419 ar │ │ │ │ +420 & boost::serialization::make_nvp("PinholeBase", │ │ │ │ +421 boost::serialization::base_object(*this)); │ │ │ │ +422 } │ │ │ │ +423 │ │ │ │ +425}; │ │ │ │ +426 │ │ │ │ +427// manifold traits │ │ │ │ +428template <> │ │ │ │ +_4_2_9struct _t_r_a_i_t_s<_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a> : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_M_a_n_i_f_o_l_d {}; │ │ │ │ +430 │ │ │ │ +431template <> │ │ │ │ +_4_3_2struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ +_M_a_n_i_f_o_l_d {}; │ │ │ │ +433 │ │ │ │ +434// range traits, used in RangeFactor │ │ │ │ +435template │ │ │ │ +_4_3_6struct _R_a_n_g_e<_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a, T> : _H_a_s_R_a_n_g_e │ │ │ │ +{}; │ │ │ │ +437 │ │ │ │ +438} // namespace gtsam │ │ │ │ +_T_h_r_e_a_d_s_a_f_e_E_x_c_e_p_t_i_o_n_._h │ │ │ │ +Base exception type that uses tbb_allocator if GTSAM is compiled with TBB. │ │ │ │ +_M_a_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ _B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ Bearing-Range product. │ │ │ │ +_P_o_s_e_3_._h │ │ │ │ +3D 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_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_:_:_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_:_:_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_:_:_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_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_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_:_:_R_a_n_g_e │ │ │ │ DDeeffiinniittiioonn BearingRange.h:40 │ │ │ │ _g_t_s_a_m_:_:_H_a_s_R_a_n_g_e │ │ │ │ DDeeffiinniittiioonn BearingRange.h:194 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_D_p_o_s_e │ │ │ │ -static Matrix26 Dpose(const Point2 &pn, double d) │ │ │ │ -Calculate Jacobian with respect to pose. │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:27 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_p_r_i_n_t │ │ │ │ -virtual void print(const std::string &s="PinholeBase") const │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:74 │ │ │ │ +_g_t_s_a_m_:_:_C_h_e_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:32 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ +A pinhole camera class that has a Pose3, functions as base class for all │ │ │ │ +pinhole cameras. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:52 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ +PinholeBase() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:123 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ +PinholeBase(const Pose3 &pose) │ │ │ │ +Constructor with pose. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:126 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_t_r_a_n_s_l_a_t_i_o_n │ │ │ │ +const Point3 & translation() const │ │ │ │ +get translation │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:162 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_r_o_t_a_t_i_o_n │ │ │ │ +const Rot3 & rotation() const │ │ │ │ +get rotation │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:157 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_M_e_a_s_u_r_e_m_e_n_t │ │ │ │ +Point2 Measurement │ │ │ │ +Some classes template on either PinholeCamera or StereoCamera, and this typedef │ │ │ │ +informs those classes... │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:64 │ │ │ │ _g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_p_o_s_e │ │ │ │ const Pose3 & pose() const │ │ │ │ return pose, constant version │ │ │ │ DDeeffiinniittiioonn CalibratedCamera.h:152 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_L_e_v_e_l_P_o_s_e │ │ │ │ -static Pose3 LevelPose(const Pose2 &pose2, double height) │ │ │ │ -Create a level pose at the given 2D pose and height. │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:49 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const PinholeBase &camera, double tol=1e-9) const │ │ │ │ -assert equality up to a tolerance │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:69 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_D_p_o_i_n_t │ │ │ │ -static Matrix23 Dpoint(const Point2 &pn, double d, const Matrix3 &Rt) │ │ │ │ -Calculate Jacobian with respect to point. │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:37 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_L_o_o_k_a_t_P_o_s_e │ │ │ │ -static Pose3 LookatPose(const Point3 &eye, const Point3 &target, const Point3 │ │ │ │ -&upVector) │ │ │ │ -Create a camera pose at the given eye position looking at a target point in the │ │ │ │ -scene with the specif... │ │ │ │ -DDeeffiinniittiioonn CalibratedCamera.cpp:58 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_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 CalibratedCamera.h:223 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_R_o_t_a_t_i_o_n │ │ │ │ +Rot3 Rotation │ │ │ │ +Pose Concept requirements. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:57 │ │ │ │ +_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_:_:_~_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ +virtual ~PinholeBase()=default │ │ │ │ +Default destructor. │ │ │ │ _g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ A Calibrated camera class [R|-R't], calibration K=I. │ │ │ │ DDeeffiinniittiioonn CalibratedCamera.h:247 │ │ │ │ -_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_C_a_m_e_r_a_:_:_p_r_i_n_t │ │ │ │ -void print(const std::string &s="PinholeCamera") const override │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:151 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:___p_r_o_j_e_c_t_2 │ │ │ │ -Point2 _project2(const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, │ │ │ │ -OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const │ │ │ │ -Templated projection of a 3D point or a point at infinity into the image. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:230 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_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 PinholeCamera.h:323 │ │ │ │ -_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 │ │ │ │ -const Calibration & calibration() const override │ │ │ │ -return calibration │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:178 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_g_e_t_P_o_s_e │ │ │ │ -const Pose3 & getPose(OptionalJacobian< 6, dimension > H) const │ │ │ │ -return pose, with derivative │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:169 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_r_o_j_e_c_t_2 │ │ │ │ -Point2 project2(const Point3 &pw, OptionalJacobian< 2, dimension > │ │ │ │ -Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const │ │ │ │ -project a 3D point from world coordinates into the image │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:245 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -PinholeCamera(const Pose3 &pose) │ │ │ │ -constructor with pose │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:66 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l │ │ │ │ -static PinholeCamera Level(const Pose2 &pose2, double height) │ │ │ │ -PinholeCamera::level with default calibration. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:92 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -PinholeCamera(const Pose3 &pose, const Calibration &K) │ │ │ │ -constructor with pose and calibration │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:71 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_e_v_e_l │ │ │ │ -static PinholeCamera Level(const Calibration &K, const Pose2 &pose2, double │ │ │ │ -height) │ │ │ │ -Create a level camera at the given 2D pose and height. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:86 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_b_a_c_k_p_r_o_j_e_c_t │ │ │ │ +Point3 backproject(const Point2 &pn, double depth, OptionalJacobian< 3, 6 > │ │ │ │ +Dresult_dpose=boost::none, OptionalJacobian< 3, 2 > Dresult_dp=boost::none, │ │ │ │ +OptionalJacobian< 3, 1 > Dresult_ddepth=boost::none) const │ │ │ │ +backproject a 2-dimensional point to a 3-dimensional point at given depth │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:352 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +CalibratedCamera() │ │ │ │ +default constructor │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:259 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera=boost::none, │ │ │ │ +OptionalJacobian< 1, 6 > Dpose=boost::none) const │ │ │ │ +Calculate range to another pose. │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:392 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_d_i_m │ │ │ │ size_t dim() const │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:187 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_I_d_e_n_t_i_t_y │ │ │ │ -static PinholeCamera Identity() │ │ │ │ -for Canonical │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:216 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:331 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +CalibratedCamera(const Vector &v) │ │ │ │ +construct from vector │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:303 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_~_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +virtual ~CalibratedCamera() │ │ │ │ +destructor │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:312 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_D_i_m │ │ │ │ static size_t Dim() │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:192 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Base &camera, double tol=1e-9) const │ │ │ │ -assert equality up to a tolerance │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:145 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ -double range(const Pose3 &pose, OptionalJacobian< 1, dimension > │ │ │ │ -Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const │ │ │ │ -Calculate range to another pose. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:275 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ -double range(const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, │ │ │ │ -dimension > Dcamera=boost::none, OptionalJacobian< 1, 6+CalibrationB::dimension │ │ │ │ -> Dother=boost::none) const │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:336 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const CalibratedCamera &camera, OptionalJacobian< 1, 6 > │ │ │ │ +H1=boost::none, OptionalJacobian< 1, 6 > H2=boost::none) const │ │ │ │ Calculate range to another camera. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:290 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -PinholeCamera(const Vector &v, const Vector &K) │ │ │ │ -Init from Vector and calibration. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:136 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_L_o_o_k_a_t │ │ │ │ -static PinholeCamera Lookat(const Point3 &eye, const Point3 &target, const │ │ │ │ -Point3 &upVector, const Calibration &K=Calibration()) │ │ │ │ -Create a camera at the given eye position looking at a target point in the │ │ │ │ -scene with the specified u... │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:105 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_c_a_m_e_r_a_P_r_o_j_e_c_t_i_o_n_M_a_t_r_i_x │ │ │ │ -Matrix34 cameraProjectionMatrix() const │ │ │ │ -for Linear Triangulation │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:318 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -VectorK6 localCoordinates(const PinholeCamera &T2) const │ │ │ │ -return canonical coordinate │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:208 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_e_t_r_a_c_t │ │ │ │ -PinholeCamera retract(const Vector &d) const │ │ │ │ -move a cameras according to d │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:199 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:330 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_r_o_j_e_c_t_2 │ │ │ │ -Point2 project2(const Unit3 &pw, OptionalJacobian< 2, dimension > │ │ │ │ -Dcamera=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const │ │ │ │ -project a point at infinity from world coordinates into the image │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:251 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_p_o_s_e │ │ │ │ -const Pose3 & pose() const │ │ │ │ -return pose │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:164 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -PinholeCamera(const Vector &v) │ │ │ │ -Init from vector, can be 6D (default calibration) or dim. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:129 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a │ │ │ │ -PinholeCamera() │ │ │ │ -default constructor │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:62 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_M_e_a_s_u_r_e_m_e_n_t │ │ │ │ -Point2 Measurement │ │ │ │ -Some classes template on either PinholeCamera or StereoCamera, and this typedef │ │ │ │ -informs those classes... │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:41 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ -double range(const CalibratedCamera &camera, OptionalJacobian< 1, dimension > │ │ │ │ -Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const │ │ │ │ -Calculate range to a calibrated camera. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:311 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ -double range(const Point3 &point, OptionalJacobian< 1, dimension > │ │ │ │ -Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:402 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="CalibratedCamera") const override │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:326 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_r_a_n_g_e │ │ │ │ +double range(const Point3 &point, OptionalJacobian< 1, 6 > Dcamera=boost::none, │ │ │ │ +OptionalJacobian< 1, 3 > Dpoint=boost::none) const │ │ │ │ Calculate range to a landmark. │ │ │ │ -DDeeffiinniittiioonn PinholeCamera.h:261 │ │ │ │ -_g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e_K │ │ │ │ -A pinhole camera class that has a Pose3 and a fixed Calibration. │ │ │ │ -DDeeffiinniittiioonn PinholePose.h:34 │ │ │ │ -_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_ _>_:_:_p_r_o_j_e_c_t │ │ │ │ -Point2 project(const Point3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, │ │ │ │ -OptionalJacobian< 2, 3 > Dpoint=boost::none, OptionalJacobian< 2, DimK > │ │ │ │ -Dcal=boost::none) const │ │ │ │ -project a 3D point from world coordinates into the image │ │ │ │ -DDeeffiinniittiioonn PinholePose.h:118 │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:381 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ +CalibratedCamera(const Pose3 &pose) │ │ │ │ +construct with pose │ │ │ │ +DDeeffiinniittiioonn CalibratedCamera.h:263 │ │ │ │ _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_:_:_P_o_s_e_3_:_:_t_r_a_n_s_f_o_r_m_F_r_o_m │ │ │ │ +Point3 transformFrom(const Point3 &point, OptionalJacobian< 3, 6 > │ │ │ │ +Hself=boost::none, OptionalJacobian< 3, 3 > Hpoint=boost::none) const │ │ │ │ +takes point in Pose coordinates and transforms it to world coordinates │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:347 │ │ │ │ _g_t_s_a_m_:_:_P_o_s_e_3_:_:_r_a_n_g_e │ │ │ │ double range(const Point3 &point, OptionalJacobian< 1, 6 > Hself=boost::none, │ │ │ │ OptionalJacobian< 1, 3 > Hpoint=boost::none) const │ │ │ │ Calculate range to a landmark. │ │ │ │ DDeeffiinniittiioonn Pose3.cpp:399 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_m_a_t_r_i_x │ │ │ │ -Matrix4 matrix() const │ │ │ │ -convert to 4*4 matrix │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:323 │ │ │ │ -_g_t_s_a_m_:_:_P_o_s_e_3_:_:_i_n_v_e_r_s_e │ │ │ │ -Pose3 inverse() const │ │ │ │ -inverse transformation with derivatives │ │ │ │ -DDeeffiinniittiioonn Pose3.cpp:49 │ │ │ │ +_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_:_:_P_o_s_e_3_:_:_r_o_t_a_t_i_o_n │ │ │ │ +const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const │ │ │ │ +get rotation │ │ │ │ +DDeeffiinniittiioonn Pose3.cpp:315 │ │ │ │ +_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_:_:_U_n_i_t_3 │ │ │ │ Represents a 3D point on a unit sphere. │ │ │ │ DDeeffiinniittiioonn Unit3.h:43 │ │ │ │ * _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 │ │ │ │ + * _C_a_l_i_b_r_a_t_e_d_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/a00398_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/OrientedPlane3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/SOn.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,178 +98,400 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
OrientedPlane3.h
│ │ │ +
SOn.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-2019, 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 OrientedPlane3.h
│ │ │ -
14 * @date Dec 19, 2013
│ │ │ -
15 * @author Alex Trevor
│ │ │ -
16 * @author Frank Dellaert
│ │ │ -
17 * @author Zhaoyang Lv
│ │ │ -
18 * @brief An infinite plane, represented by a normal direction and perpendicular distance
│ │ │ -
19 */
│ │ │ +
19#pragma once
│ │ │
20
│ │ │ -
21#pragma once
│ │ │ -
22
│ │ │ -
23#include <gtsam/geometry/Unit3.h>
│ │ │ - │ │ │ -
25#include <string>
│ │ │ +
21#include <gtsam/base/Lie.h>
│ │ │ +
22#include <gtsam/base/Manifold.h>
│ │ │ + │ │ │ +
24#include <gtsam/dllexport.h>
│ │ │ +
25#include <Eigen/Core>
│ │ │
26
│ │ │ -
27namespace gtsam {
│ │ │ +
27#include <boost/serialization/nvp.hpp>
│ │ │
28
│ │ │ -
│ │ │ -
36class GTSAM_EXPORT OrientedPlane3 {
│ │ │ -
37private:
│ │ │ -
38 Unit3 n_;
│ │ │ -
39 double d_;
│ │ │ -
40
│ │ │ -
41public:
│ │ │ -
42 enum {
│ │ │ -
43 dimension = 3
│ │ │ -
44 };
│ │ │ -
45
│ │ │ -
48
│ │ │ -
│ │ │ - │ │ │ -
51 n_(), d_(0.0) {
│ │ │ -
52 }
│ │ │ -
│ │ │ -
53
│ │ │ -
│ │ │ -
55 OrientedPlane3(const Unit3& n, double d) :
│ │ │ -
56 n_(n), d_(d) {
│ │ │ -
57 }
│ │ │ -
│ │ │ +
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}
│ │ │ +
│ │ │ +
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
│ │ │ +
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>;
│ │ │
58
│ │ │ -
│ │ │ -
60 explicit OrientedPlane3(const Vector4& vec)
│ │ │ -
61 : n_(vec(0), vec(1), vec(2)), d_(vec(3)) {}
│ │ │ -
│ │ │ -
62
│ │ │ -
│ │ │ -
64 OrientedPlane3(double a, double b, double c, double d) {
│ │ │ -
65 n_ = Unit3(a, b, c);
│ │ │ -
66 d_ = d;
│ │ │ -
67 }
│ │ │ -
│ │ │ -
68
│ │ │ + │ │ │ +
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
│ │ │ -
74 void print(const std::string& s = std::string()) const;
│ │ │ -
75
│ │ │ -
│ │ │ -
77 bool equals(const OrientedPlane3& s, double tol = 1e-9) const {
│ │ │ -
78 return (n_.equals(s.n_, tol) && (std::abs(d_ - s.d_) < tol));
│ │ │ -
79 }
│ │ │ -
│ │ │ +
73 public:
│ │ │ +
76
│ │ │ +
78 template <int N_ = N, typename = IsFixed<N_>>
│ │ │ +
79 SO() : matrix_(MatrixNN::Identity()) {}
│ │ │
80
│ │ │ -
82
│ │ │ -
89 OrientedPlane3 transform(const Pose3& xr,
│ │ │ -
90 OptionalJacobian<3, 3> Hp = boost::none,
│ │ │ -
91 OptionalJacobian<3, 6> Hr = boost::none) const;
│ │ │ +
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 }
│ │ │ +
│ │ │ +
88
│ │ │ +
90 template <typename Derived>
│ │ │ +
91 explicit SO(const Eigen::MatrixBase<Derived>& R) : matrix_(R.eval()) {}
│ │ │
92
│ │ │ -
100 Vector3 errorVector(const OrientedPlane3& other,
│ │ │ -
101 OptionalJacobian<3, 3> H1 = boost::none,
│ │ │ -
102 OptionalJacobian<3, 3> H2 = boost::none) const;
│ │ │ -
103
│ │ │ -
│ │ │ -
105 inline static size_t Dim() {
│ │ │ -
106 return 3;
│ │ │ +
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 inline size_t dim() const {
│ │ │ -
111 return 3;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
115 OrientedPlane3 retract(const Vector3& v,
│ │ │ -
116 OptionalJacobian<3, 3> H = boost::none) const;
│ │ │ -
117
│ │ │ -
119 Vector3 localCoordinates(const OrientedPlane3& s) const;
│ │ │ -
120
│ │ │ -
│ │ │ -
122 inline Vector4 planeCoefficients() const {
│ │ │ -
123 Vector3 unit_vec = n_.unitVector();
│ │ │ -
124 return Vector4(unit_vec[0], unit_vec[1], unit_vec[2], d_);
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
│ │ │ -
128 inline Unit3 normal(OptionalJacobian<2, 3> H = boost::none) const {
│ │ │ -
129 if (H) *H << I_2x2, Z_2x1;
│ │ │ -
130 return n_;
│ │ │ -
131 }
│ │ │ -
│ │ │ -
132
│ │ │ -
│ │ │ -
134 inline double distance(OptionalJacobian<1, 3> H = boost::none) const {
│ │ │ -
135 if (H) *H << 0,0,1;
│ │ │ -
136 return d_;
│ │ │ -
137 }
│ │ │ -
│ │ │ -
138};
│ │ │ -
│ │ │ -
139
│ │ │ -
│ │ │ -
140template<> struct traits<OrientedPlane3> : public internal::Manifold<
│ │ │ -
141OrientedPlane3> {
│ │ │ -
142};
│ │ │ -
│ │ │ -
143
│ │ │ -
│ │ │ -
144template<> struct traits<const OrientedPlane3> : public internal::Manifold<
│ │ │ -
145OrientedPlane3> {
│ │ │ -
146};
│ │ │ +
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) {}
│ │ │ +
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);
│ │ │ +
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 }
│ │ │ +
│ │ │ +
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 }
│ │ │
│ │ │ -
147
│ │ │ -
148} // namespace gtsam
│ │ │
149
│ │ │ -
3D Pose
│ │ │ +
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(); }
│ │ │ +
159
│ │ │ +
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"
│ │ │ +
Base class and basic functions for Lie types.
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
This marks a GTSAM object to require alignment.
Definition types.h:317
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
make_shared trampoline function to ensure proper alignment
│ │ │ +
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)
│ │ │
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
│ │ │ +
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
│ │ │ -
Both ManifoldTraits and Testable.
Definition Manifold.h:120
│ │ │ +
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
│ │ │ -
Represents an infinite plane in 3D, which is composed of a planar normal and its perpendicular distan...
Definition OrientedPlane3.h:36
│ │ │ -
OrientedPlane3(double a, double b, double c, double d)
Construct from four numbers of plane coeffcients (a, b, c, d)
Definition OrientedPlane3.h:64
│ │ │ -
Vector4 planeCoefficients() const
Returns the plane coefficients.
Definition OrientedPlane3.h:122
│ │ │ -
OrientedPlane3(const Unit3 &n, double d)
Construct from a Unit3 and a distance.
Definition OrientedPlane3.h:55
│ │ │ -
size_t dim() const
Dimensionality of tangent space = 3 DOF.
Definition OrientedPlane3.h:110
│ │ │ -
bool equals(const OrientedPlane3 &s, double tol=1e-9) const
The equals function with tolerance.
Definition OrientedPlane3.h:77
│ │ │ -
OrientedPlane3(const Vector4 &vec)
Construct from a vector of plane coefficients.
Definition OrientedPlane3.h:60
│ │ │ -
static size_t Dim()
Dimensionality of tangent space = 3 DOF.
Definition OrientedPlane3.h:105
│ │ │ -
OrientedPlane3()
Default constructor.
Definition OrientedPlane3.h:50
│ │ │ -
double distance(OptionalJacobian< 1, 3 > H=boost::none) const
Return the perpendicular distance to the origin.
Definition OrientedPlane3.h:134
│ │ │ -
Unit3 normal(OptionalJacobian< 2, 3 > H=boost::none) const
Return the normal.
Definition OrientedPlane3.h:128
│ │ │ -
A 3D pose (R,t) : (Rot3,Point3)
Definition Pose3.h:37
│ │ │ -
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
│ │ │ -
bool equals(const Unit3 &s, double tol=1e-9) const
The equals function with tolerance.
Definition Unit3.h:115
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,201 +1,507 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -OrientedPlane3.h │ │ │ │ +SOn.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-2019, 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 OrientedPlane3.h │ │ │ │ -14 * @date Dec 19, 2013 │ │ │ │ -15 * @author Alex Trevor │ │ │ │ -16 * @author Frank Dellaert │ │ │ │ -17 * @author Zhaoyang Lv │ │ │ │ -18 * @brief An infinite plane, represented by a normal direction and │ │ │ │ -perpendicular distance │ │ │ │ -19 */ │ │ │ │ +19#pragma once │ │ │ │ 20 │ │ │ │ -21#pragma once │ │ │ │ -22 │ │ │ │ -23#include │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -25#include │ │ │ │ +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 │ │ │ │ -27namespace _g_t_s_a_m { │ │ │ │ +27#include │ │ │ │ 28 │ │ │ │ -_3_6class GTSAM_EXPORT _O_r_i_e_n_t_e_d_P_l_a_n_e_3 { │ │ │ │ -37private: │ │ │ │ -38 _U_n_i_t_3 n_; │ │ │ │ -39 double d_; │ │ │ │ -40 │ │ │ │ -41public: │ │ │ │ -42 enum { │ │ │ │ -43 dimension = 3 │ │ │ │ -44 }; │ │ │ │ -45 │ │ │ │ -48 │ │ │ │ -_5_0 _O_r_i_e_n_t_e_d_P_l_a_n_e_3() : │ │ │ │ -51 n_(), d_(0.0) { │ │ │ │ -52 } │ │ │ │ -53 │ │ │ │ -_5_5 _O_r_i_e_n_t_e_d_P_l_a_n_e_3(const _U_n_i_t_3& n, double d) : │ │ │ │ -56 n_(n), d_(d) { │ │ │ │ -57 } │ │ │ │ +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} │ │ │ │ +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 │ │ │ │ +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; │ │ │ │ 58 │ │ │ │ -_6_0 explicit _O_r_i_e_n_t_e_d_P_l_a_n_e_3(const Vector4& vec) │ │ │ │ -61 : n_(vec(0), vec(1), vec(2)), d_(vec(3)) {} │ │ │ │ -62 │ │ │ │ -_6_4 _O_r_i_e_n_t_e_d_P_l_a_n_e_3(double a, double b, double c, double d) { │ │ │ │ -65 n_ = _U_n_i_t_3(a, b, c); │ │ │ │ -66 d_ = d; │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ +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 │ │ │ │ -74 void _p_r_i_n_t(const std::string& s = std::string()) const; │ │ │ │ -75 │ │ │ │ -_7_7 bool _e_q_u_a_l_s(const _O_r_i_e_n_t_e_d_P_l_a_n_e_3& s, double tol = 1e-9) const { │ │ │ │ -78 return (n_._e_q_u_a_l_s(s.n_, tol) && (std::abs(d_ - s.d_) < tol)); │ │ │ │ -79 } │ │ │ │ +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 │ │ │ │ -89 _O_r_i_e_n_t_e_d_P_l_a_n_e_3 transform(const _P_o_s_e_3& xr, │ │ │ │ -90 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> Hp = boost::none, │ │ │ │ -91 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> Hr = boost::none) const; │ │ │ │ +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 } │ │ │ │ +88 │ │ │ │ +90 template │ │ │ │ +_9_1 explicit _S_O(const Eigen::MatrixBase& R) : _m_a_t_r_i_x__(R.eval()) {} │ │ │ │ 92 │ │ │ │ -100 Vector3 errorVector(const _O_r_i_e_n_t_e_d_P_l_a_n_e_3& other, │ │ │ │ -101 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> 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 │ │ │ │ -_1_0_5 inline static size_t _D_i_m() { │ │ │ │ -106 return 3; │ │ │ │ +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 │ │ │ │ -_1_1_0 inline size_t _d_i_m() const { │ │ │ │ -111 return 3; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -115 _O_r_i_e_n_t_e_d_P_l_a_n_e_3 retract(const Vector3& v, │ │ │ │ -116 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> H = boost::none) const; │ │ │ │ -117 │ │ │ │ -119 Vector3 localCoordinates(const _O_r_i_e_n_t_e_d_P_l_a_n_e_3& s) const; │ │ │ │ -120 │ │ │ │ -_1_2_2 inline Vector4 _p_l_a_n_e_C_o_e_f_f_i_c_i_e_n_t_s() const { │ │ │ │ -123 Vector3 unit_vec = n_._u_n_i_t_V_e_c_t_o_r(); │ │ │ │ -124 return Vector4(unit_vec[0], unit_vec[1], unit_vec[2], d_); │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -_1_2_8 inline _U_n_i_t_3 _n_o_r_m_a_l(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> H = boost::none) const { │ │ │ │ -129 if (H) *H << I_2x2, Z_2x1; │ │ │ │ -130 return n_; │ │ │ │ -131 } │ │ │ │ -132 │ │ │ │ -_1_3_4 inline double _d_i_s_t_a_n_c_e(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> H = boost::none) const { │ │ │ │ -135 if (H) *H << 0,0,1; │ │ │ │ -136 return d_; │ │ │ │ -137 } │ │ │ │ -138}; │ │ │ │ -139 │ │ │ │ -_1_4_0template<> struct _t_r_a_i_t_s<_O_r_i_e_n_t_e_d_P_l_a_n_e_3> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d< │ │ │ │ -141OrientedPlane3> { │ │ │ │ -142}; │ │ │ │ -143 │ │ │ │ -_1_4_4template<> struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d< │ │ │ │ -145OrientedPlane3> { │ │ │ │ -146}; │ │ │ │ -147 │ │ │ │ -148} // namespace gtsam │ │ │ │ +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) {} │ │ │ │ +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); │ │ │ │ +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 } │ │ │ │ +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 } │ │ │ │ 149 │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ +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(); } │ │ │ │ +159 │ │ │ │ +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 │ │ │ │ +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" │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ +_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_n_i_f_o_l_d_._h │ │ │ │ +Base class and basic functions for Manifold types. │ │ │ │ +_m_a_k_e___s_h_a_r_e_d_._h │ │ │ │ +make_shared trampoline function to ensure proper alignment │ │ │ │ +_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) │ │ │ │ _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_:_:_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_:_:_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_:_:_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_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3 │ │ │ │ -Represents an infinite plane in 3D, which is composed of a planar normal and │ │ │ │ -its perpendicular distan... │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:36 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3 │ │ │ │ -OrientedPlane3(double a, double b, double c, double d) │ │ │ │ -Construct from four numbers of plane coeffcients (a, b, c, d) │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:64 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_p_l_a_n_e_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ -Vector4 planeCoefficients() const │ │ │ │ -Returns the plane coefficients. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:122 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3 │ │ │ │ -OrientedPlane3(const Unit3 &n, double d) │ │ │ │ -Construct from a Unit3 and a distance. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:55 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_d_i_m │ │ │ │ -size_t dim() const │ │ │ │ -Dimensionality of tangent space = 3 DOF. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:110 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const OrientedPlane3 &s, double tol=1e-9) const │ │ │ │ -The equals function with tolerance. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:77 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3 │ │ │ │ -OrientedPlane3(const Vector4 &vec) │ │ │ │ -Construct from a vector of plane coefficients. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:60 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_D_i_m │ │ │ │ -static size_t Dim() │ │ │ │ -Dimensionality of tangent space = 3 DOF. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:105 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3 │ │ │ │ -OrientedPlane3() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:50 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_d_i_s_t_a_n_c_e │ │ │ │ -double distance(OptionalJacobian< 1, 3 > H=boost::none) const │ │ │ │ -Return the perpendicular distance to the origin. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:134 │ │ │ │ -_g_t_s_a_m_:_:_O_r_i_e_n_t_e_d_P_l_a_n_e_3_:_:_n_o_r_m_a_l │ │ │ │ -Unit3 normal(OptionalJacobian< 2, 3 > H=boost::none) const │ │ │ │ -Return the normal. │ │ │ │ -DDeeffiinniittiioonn OrientedPlane3.h:128 │ │ │ │ -_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_:_:_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_:_:_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_:_:_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 │ │ │ │ +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_:_:_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 │ │ │ │ +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_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 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ - * OOrriieenntteeddPPllaannee33..hh │ │ │ │ + * _S_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/a00404.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Line3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,56 +95,46 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Line3.h File Reference
│ │ │ +Namespaces
│ │ │ +
Cyclic.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

4 dimensional manifold of 3D lines │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::Line3
 A 3D line (R,a,b) : (Rot3,Scalar,Scalar) More...
class  gtsam::Cyclic< N >
 Cyclic group of order N. More...
 
struct  gtsam::traits< Line3 >
 
struct  gtsam::traits< const Line3 >
struct  gtsam::traits< Cyclic< N > >
 Define cyclic group to be a model of the Additive Group concept. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

Line3 gtsam::transformTo (const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose=boost::none, OptionalJacobian< 4, 4 > Dline=boost::none)
 Transform a line from world to camera frame.
 
│ │ │

Detailed Description

│ │ │ -

4 dimensional manifold of 3D lines

│ │ │ -
Author
Akshay Krishnan
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ +

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

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +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 | _F_u_n_c_t_i_o_n_s │ │ │ │ -Line3.h File Reference │ │ │ │ -4 dimensional manifold of 3D lines _M_o_r_e_._._. │ │ │ │ +_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_._._. │ │ │ │ _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_:_:_L_i_n_e_3 │ │ │ │ -  A 3D line (R,a,b) : (_R_o_t_3,Scalar,Scalar) _M_o_r_e_._._. │ │ │ │ + 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_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _L_i_n_e_3_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _L_i_n_e_3_ _> │ │ │ │ +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_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -_L_i_n_e_3  _g_t_s_a_m_:_:_t_r_a_n_s_f_o_r_m_T_o (const _P_o_s_e_3 &wTc, const _L_i_n_e_3 &wL, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< │ │ │ │ - 4, 6 > Dpose=boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n< 4, 4 > Dline=boost::none) │ │ │ │ -  Transform a line from world to camera frame. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -4 dimensional manifold of 3D lines │ │ │ │ +Cyclic group, i.e., the integers modulo N. │ │ │ │ Author │ │ │ │ - Akshay Krishnan │ │ │ │ Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _L_i_n_e_3_._h │ │ │ │ + * _C_y_c_l_i_c_._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/a00404.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,5 +1,4 @@ │ │ │ │ var a00404 = [ │ │ │ │ - ["gtsam::traits< Line3 >", "a03084.html", null], │ │ │ │ - ["gtsam::traits< const Line3 >", "a03088.html", null], │ │ │ │ - ["transformTo", "a00404.html#aae9294b064e306ac7993dea546c0d8fb", null] │ │ │ │ + ["gtsam::Cyclic< N >", "a03060.html", "a03060"], │ │ │ │ + ["gtsam::traits< Cyclic< N > >", "a03064.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00404_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Line3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,130 +98,114 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Line3.h
│ │ │ +
Cyclic.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ -
2 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ -
3 * Atlanta, Georgia 30332-0415
│ │ │ -
4 * All Rights Reserved
│ │ │ -
5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ -
6 * See LICENSE for the license information
│ │ │ -
7 * -------------------------------------------------------------------------- */
│ │ │ -
8
│ │ │ -
15// \callgraph
│ │ │ -
16
│ │ │ -
17#pragma once
│ │ │ -
18
│ │ │ -
19#include <gtsam/geometry/Rot3.h>
│ │ │ - │ │ │ -
21
│ │ │ -
22namespace gtsam {
│ │ │ -
23
│ │ │ -
24class Line3;
│ │ │ +
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
│ │ │ -
34GTSAM_EXPORT Line3 transformTo(const Pose3 &wTc, const Line3 &wL,
│ │ │ -
35 OptionalJacobian<4, 6> Dpose = boost::none,
│ │ │ -
36 OptionalJacobian<4, 4> Dline = boost::none);
│ │ │ -
37
│ │ │ -
38
│ │ │ -
│ │ │ -
44class GTSAM_EXPORT Line3 {
│ │ │ -
45 private:
│ │ │ -
46 Rot3 R_; // Rotation of line about x and y in world frame
│ │ │ -
47 double a_, b_; // Intersection of line with the world x-y plane rotated by R_
│ │ │ -
48 // Also the closest point on line to origin
│ │ │ -
49 public:
│ │ │ -
50 enum { dimension = 4 };
│ │ │ -
51
│ │ │ -
│ │ │ - │ │ │ -
54 a_(0), b_(0) {}
│ │ │ -
│ │ │ -
55
│ │ │ -
│ │ │ -
57 Line3(const Rot3 &R, const double a, const double b) :
│ │ │ -
58 R_(R), a_(a), b_(b) {}
│ │ │ -
│ │ │ -
59
│ │ │ -
71 Line3 retract(const Vector4 &v,
│ │ │ -
72 OptionalJacobian<4, 4> Dp = boost::none,
│ │ │ -
73 OptionalJacobian<4, 4> Dv = boost::none) const;
│ │ │ +
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 }
│ │ │ +
│ │ │ +
│ │ │ +
48 Cyclic operator+(const Cyclic& h) const {
│ │ │ +
49 return (i_ + h.i_) % N;
│ │ │ +
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 }
│ │ │ +
│ │ │ +
│ │ │ +
64 bool equals(const Cyclic& other, double tol = 1e-9) const {
│ │ │ +
65 return other.i_ == i_;
│ │ │ +
66 }
│ │ │ +
│ │ │ +
67};
│ │ │ +
│ │ │ +
68
│ │ │ +
70template<size_t N>
│ │ │ +
│ │ │ +
71struct traits<Cyclic<N> > : internal::AdditiveGroupTraits<Cyclic<N> >, //
│ │ │ +
72 Testable<Cyclic<N> > {
│ │ │ +
73};
│ │ │ +
│ │ │
74
│ │ │ -
84 Vector4 localCoordinates(const Line3 &q,
│ │ │ -
85 OptionalJacobian<4, 4> Dp = boost::none,
│ │ │ -
86 OptionalJacobian<4, 4> Dq = boost::none) const;
│ │ │ -
87
│ │ │ -
92 void print(const std::string &s = "") const;
│ │ │ -
93
│ │ │ -
100 bool equals(const Line3 &l2, double tol = 10e-9) const;
│ │ │ -
101
│ │ │ -
108 Unit3 project(OptionalJacobian<2, 4> Dline = boost::none) const;
│ │ │ -
109
│ │ │ -
118 Point3 point(double distance = 0) const;
│ │ │ -
119
│ │ │ -
│ │ │ -
123 inline Rot3 R() const {
│ │ │ -
124 return R_;
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
│ │ │ -
130 inline double a() const {
│ │ │ -
131 return a_;
│ │ │ -
132 }
│ │ │ -
│ │ │ -
133
│ │ │ -
│ │ │ -
137 inline double b() const {
│ │ │ -
138 return b_;
│ │ │ -
139 }
│ │ │ -
│ │ │ -
140
│ │ │ -
149 friend Line3 transformTo(const Pose3 &wTc, const Line3 &wL,
│ │ │ - │ │ │ - │ │ │ -
152};
│ │ │ -
│ │ │ -
153
│ │ │ -
154template<>
│ │ │ -
155struct traits<Line3> : public internal::Manifold<Line3> {};
│ │ │ -
156
│ │ │ -
157template<>
│ │ │ -
158struct traits<const Line3> : public internal::Manifold<Line3> {};
│ │ │ -
159}
│ │ │ -
3D rotation represented as a rotation matrix or quaternion
│ │ │ -
3D Pose
│ │ │ +
75} // \namespace gtsam
│ │ │ +
76
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Concept check class for variable types with Group properties.
│ │ │
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
│ │ │ -
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
│ │ │ -
Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose, OptionalJacobian< 4, 4 > Dline)
Transform a line from world to camera frame.
Definition Line3.cpp:94
│ │ │ -
Point2_ project(const Point3_ &p_cam)
Expression version of PinholeBase::Project.
Definition expressions.h:131
│ │ │
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
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
A 3D line (R,a,b) : (Rot3,Scalar,Scalar)
Definition Line3.h:44
│ │ │ -
Rot3 R() const
Return the rotation of the line.
Definition Line3.h:123
│ │ │ -
Line3()
Default constructor is the Z axis.
Definition Line3.h:53
│ │ │ -
Line3(const Rot3 &R, const double a, const double b)
Constructor for general line from (R, a, b)
Definition Line3.h:57
│ │ │ -
double b() const
Return the y-coordinate of the intersection of the line with the xy plane.
Definition Line3.h:137
│ │ │ -
double a() const
Return the x-coordinate of the intersection of the line with the xy plane.
Definition Line3.h:130
│ │ │ -
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
│ │ │ -
Represents a 3D point on a unit sphere.
Definition Unit3.h:43
│ │ │ +
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
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,163 +1,118 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Line3.h │ │ │ │ +Cyclic.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 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -3 * Atlanta, Georgia 30332-0415 │ │ │ │ -4 * All Rights Reserved │ │ │ │ -5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ -6 * See LICENSE for the license information │ │ │ │ -7 * ------------------------------------------------------------------------- │ │ │ │ +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 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ -8 │ │ │ │ -15// \callgraph │ │ │ │ -16 │ │ │ │ -17#pragma once │ │ │ │ -18 │ │ │ │ -19#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_3_._h> │ │ │ │ -20#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -21 │ │ │ │ -22namespace _g_t_s_a_m { │ │ │ │ -23 │ │ │ │ -24class Line3; │ │ │ │ +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 │ │ │ │ -34GTSAM_EXPORT Line3 _t_r_a_n_s_f_o_r_m_T_o(const Pose3 &wTc, const Line3 &wL, │ │ │ │ -35 OptionalJacobian<4, 6> Dpose = boost::none, │ │ │ │ -36 OptionalJacobian<4, 4> Dline = boost::none); │ │ │ │ -37 │ │ │ │ -38 │ │ │ │ -_4_4class GTSAM_EXPORT _L_i_n_e_3 { │ │ │ │ -45 private: │ │ │ │ -46 _R_o_t_3 R_; // Rotation of line about x and y in world frame │ │ │ │ -47 double a_, b_; // Intersection of line with the world x-y plane rotated by │ │ │ │ -R_ │ │ │ │ -48 // Also the closest point on line to origin │ │ │ │ -49 public: │ │ │ │ -50 enum { dimension = 4 }; │ │ │ │ -51 │ │ │ │ -_5_3 _L_i_n_e_3() : │ │ │ │ -54 a_(0), b_(0) {} │ │ │ │ -55 │ │ │ │ -_5_7 _L_i_n_e_3(const _R_o_t_3 &R, const double a, const double b) : │ │ │ │ -58 R_(R), a_(a), b_(b) {} │ │ │ │ -59 │ │ │ │ -71 _L_i_n_e_3 retract(const Vector4 &v, │ │ │ │ -72 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Dp = boost::none, │ │ │ │ -73 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Dv = boost::none) const; │ │ │ │ +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; │ │ │ │ +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}; │ │ │ │ +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 │ │ │ │ -84 Vector4 localCoordinates(const _L_i_n_e_3 &q, │ │ │ │ -85 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Dp = boost::none, │ │ │ │ -86 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Dq = boost::none) const; │ │ │ │ -87 │ │ │ │ -92 void _p_r_i_n_t(const std::string &s = "") const; │ │ │ │ -93 │ │ │ │ -100 bool _e_q_u_a_l_s(const _L_i_n_e_3 &l2, double tol = 10e-9) const; │ │ │ │ -101 │ │ │ │ -108 _U_n_i_t_3 _p_r_o_j_e_c_t(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _4_> Dline = boost::none) const; │ │ │ │ -109 │ │ │ │ -118 _P_o_i_n_t_3 point(double distance = 0) const; │ │ │ │ -119 │ │ │ │ -_1_2_3 inline _R_o_t_3 _R() const { │ │ │ │ -124 return R_; │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -_1_3_0 inline double _a() const { │ │ │ │ -131 return a_; │ │ │ │ -132 } │ │ │ │ -133 │ │ │ │ -_1_3_7 inline double _b() const { │ │ │ │ -138 return b_; │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ -149 friend _L_i_n_e_3 _t_r_a_n_s_f_o_r_m_T_o(const _P_o_s_e_3 &wTc, const _L_i_n_e_3 &wL, │ │ │ │ -150 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _6_> Dpose, │ │ │ │ -151 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_4_,_ _4_> Dline); │ │ │ │ -152}; │ │ │ │ -153 │ │ │ │ -154template<> │ │ │ │ -_1_5_5struct _t_r_a_i_t_s<_L_i_n_e_3> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ -156 │ │ │ │ -157template<> │ │ │ │ -_1_5_8struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ -159} │ │ │ │ -_R_o_t_3_._h │ │ │ │ -3D rotation represented as a rotation matrix or quaternion │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ +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. │ │ │ │ _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_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_n_s_f_o_r_m_T_o │ │ │ │ -Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > │ │ │ │ -Dpose, OptionalJacobian< 4, 4 > Dline) │ │ │ │ -Transform a line from world to camera frame. │ │ │ │ -DDeeffiinniittiioonn Line3.cpp:94 │ │ │ │ -_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_:_:_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_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3 │ │ │ │ -A 3D line (R,a,b) : (Rot3,Scalar,Scalar) │ │ │ │ -DDeeffiinniittiioonn Line3.h:44 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3_:_:_R │ │ │ │ -Rot3 R() const │ │ │ │ -Return the rotation of the line. │ │ │ │ -DDeeffiinniittiioonn Line3.h:123 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3_:_:_L_i_n_e_3 │ │ │ │ -Line3() │ │ │ │ -Default constructor is the Z axis. │ │ │ │ -DDeeffiinniittiioonn Line3.h:53 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3_:_:_L_i_n_e_3 │ │ │ │ -Line3(const Rot3 &R, const double a, const double b) │ │ │ │ -Constructor for general line from (R, a, b) │ │ │ │ -DDeeffiinniittiioonn Line3.h:57 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3_:_:_b │ │ │ │ -double b() const │ │ │ │ -Return the y-coordinate of the intersection of the line with the xy plane. │ │ │ │ -DDeeffiinniittiioonn Line3.h:137 │ │ │ │ -_g_t_s_a_m_:_:_L_i_n_e_3_:_:_a │ │ │ │ -double a() const │ │ │ │ -Return the x-coordinate of the intersection of the line with the xy plane. │ │ │ │ -DDeeffiinniittiioonn Line3.h:130 │ │ │ │ -_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_:_:_U_n_i_t_3 │ │ │ │ -Represents a 3D point on a unit sphere. │ │ │ │ -DDeeffiinniittiioonn Unit3.h:43 │ │ │ │ +_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 │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _L_i_n_e_3_._h │ │ │ │ + * _C_y_c_l_i_c_._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/a00410_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/EssentialMatrix.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Pose3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,248 +98,334 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
EssentialMatrix.h
│ │ │ +
Pose3.h
│ │ │
│ │ │
│ │ │ -
1/*
│ │ │ -
2 * @file EssentialMatrix.h
│ │ │ -
3 * @brief EssentialMatrix class
│ │ │ -
4 * @author Frank Dellaert
│ │ │ -
5 * @date December 17, 2013
│ │ │ -
6 */
│ │ │ -
7
│ │ │ -
8#pragma once
│ │ │ -
9
│ │ │ - │ │ │ -
11#include <gtsam/geometry/Unit3.h>
│ │ │ - │ │ │ -
13#include <gtsam/base/Manifold.h>
│ │ │ -
14
│ │ │ -
15#include <iosfwd>
│ │ │ -
16#include <string>
│ │ │ -
17
│ │ │ -
18namespace gtsam {
│ │ │ +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
│ │ │ +
17// \callgraph
│ │ │ +
18#pragma once
│ │ │
19
│ │ │ -
│ │ │ - │ │ │ -
27 private:
│ │ │ -
28 Rot3 R_;
│ │ │ -
29 Unit3 t_;
│ │ │ -
30 Matrix3 E_;
│ │ │ +
20#include <gtsam/config.h>
│ │ │ +
21
│ │ │ + │ │ │ + │ │ │ +
24#include <gtsam/geometry/Rot3.h>
│ │ │ +
25#include <gtsam/base/Lie.h>
│ │ │ +
26
│ │ │ +
27namespace gtsam {
│ │ │ +
28
│ │ │ +
29class Pose2;
│ │ │ +
30// forward declare
│ │ │
31
│ │ │ -
32 public:
│ │ │ -
│ │ │ -
34 static Vector3 Homogeneous(const Point2& p) {
│ │ │ -
35 return Vector3(p.x(), p.y(), 1);
│ │ │ -
36 }
│ │ │ -
│ │ │ -
37
│ │ │ -
40
│ │ │ -
│ │ │ -
42 EssentialMatrix() :E_(t_.skew()) {
│ │ │ -
43 }
│ │ │ -
│ │ │ -
44
│ │ │ -
│ │ │ -
46 EssentialMatrix(const Rot3& aRb, const Unit3& aTb) :
│ │ │ -
47 R_(aRb), t_(aTb), E_(t_.skew() * R_.matrix()) {
│ │ │ -
48 }
│ │ │ -
│ │ │ -
49
│ │ │ -
51 GTSAM_EXPORT static EssentialMatrix FromRotationAndDirection(const Rot3& aRb, const Unit3& aTb,
│ │ │ -
52 OptionalJacobian<5, 3> H1 = boost::none,
│ │ │ -
53 OptionalJacobian<5, 2> H2 = boost::none);
│ │ │ -
54
│ │ │ -
56 GTSAM_EXPORT static EssentialMatrix FromPose3(const Pose3& _1P2_,
│ │ │ -
57 OptionalJacobian<5, 6> H = boost::none);
│ │ │ -
58
│ │ │ -
60 template<typename Engine>
│ │ │ -
│ │ │ -
61 static EssentialMatrix Random(Engine & rng) {
│ │ │ - │ │ │ -
63 }
│ │ │ +
│ │ │ +
37class GTSAM_EXPORT Pose3: public LieGroup<Pose3, 6> {
│ │ │ +
38public:
│ │ │ +
39
│ │ │ +
41 typedef Rot3 Rotation;
│ │ │ +
42 typedef Point3 Translation;
│ │ │ +
43
│ │ │ +
44private:
│ │ │ +
45
│ │ │ +
46 Rot3 R_;
│ │ │ +
47 Point3 t_;
│ │ │ +
48
│ │ │ +
49public:
│ │ │ +
50
│ │ │ +
53
│ │ │ +
55 Pose3() : R_(traits<Rot3>::Identity()), t_(traits<Point3>::Identity()) {}
│ │ │ +
56
│ │ │ +
│ │ │ +
58 Pose3(const Pose3& pose) :
│ │ │ +
59 R_(pose.R_), t_(pose.t_) {
│ │ │ +
60 }
│ │ │ +
│ │ │ +
61
│ │ │ +
│ │ │ +
63 Pose3(const Rot3& R, const Point3& t) :
│ │ │ +
64 R_(R), t_(t) {
│ │ │ +
65 }
│ │ │
│ │ │ -
64
│ │ │ -
65 virtual ~EssentialMatrix() {}
│ │ │
66
│ │ │ -
68
│ │ │ -
71
│ │ │ -
73 GTSAM_EXPORT void print(const std::string& s = "") const;
│ │ │ -
74
│ │ │ -
│ │ │ -
76 bool equals(const EssentialMatrix& other, double tol = 1e-8) const {
│ │ │ -
77 return R_.equals(other.R_, tol)
│ │ │ -
78 && t_.equals(other.t_, tol);
│ │ │ -
79 }
│ │ │ -
│ │ │ +
68 explicit Pose3(const Pose2& pose2);
│ │ │ +
69
│ │ │ +
│ │ │ +
71 Pose3(const Matrix &T) :
│ │ │ +
72 R_(T(0, 0), T(0, 1), T(0, 2), T(1, 0), T(1, 1), T(1, 2), T(2, 0), T(2, 1),
│ │ │ +
73 T(2, 2)), t_(T(0, 3), T(1, 3), T(2, 3)) {
│ │ │ +
74 }
│ │ │ +
│ │ │ +
75
│ │ │ +
77 static Pose3 Create(const Rot3& R, const Point3& t,
│ │ │ +
78 OptionalJacobian<6, 3> HR = boost::none,
│ │ │ +
79 OptionalJacobian<6, 3> Ht = boost::none);
│ │ │
80
│ │ │ -
82
│ │ │ -
85 enum { dimension = 5 };
│ │ │ -
86 inline static size_t Dim() { return dimension;}
│ │ │ -
87 inline size_t dim() const { return dimension;}
│ │ │ -
88
│ │ │ -
89 typedef OptionalJacobian<dimension, dimension> ChartJacobian;
│ │ │ +
86 static boost::optional<Pose3> Align(const Point3Pairs& abPointPairs);
│ │ │ +
87
│ │ │ +
88 // Version of Pose3::Align that takes 2 matrices.
│ │ │ +
89 static boost::optional<Pose3> Align(const Matrix& a, const Matrix& b);
│ │ │
90
│ │ │ -
│ │ │ -
92 EssentialMatrix retract(const Vector5& xi) const {
│ │ │ -
93 return EssentialMatrix(R_.retract(xi.head<3>()), t_.retract(xi.tail<2>()));
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
97 Vector5 localCoordinates(const EssentialMatrix& other) const {
│ │ │ -
98 auto v1 = R_.localCoordinates(other.R_);
│ │ │ -
99 auto v2 = t_.localCoordinates(other.t_);
│ │ │ -
100 Vector5 v;
│ │ │ -
101 v << v1, v2;
│ │ │ -
102 return v;
│ │ │ -
103 }
│ │ │ -
│ │ │ -
105
│ │ │ -
108
│ │ │ -
│ │ │ -
110 inline const Rot3& rotation() const {
│ │ │ -
111 return R_;
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
│ │ │ -
115 inline const Unit3& direction() const {
│ │ │ -
116 return t_;
│ │ │ -
117 }
│ │ │ -
│ │ │ -
118
│ │ │ -
│ │ │ -
120 inline const Matrix3& matrix() const {
│ │ │ -
121 return E_;
│ │ │ -
122 }
│ │ │ -
│ │ │ -
123
│ │ │ -
│ │ │ -
125 inline const Unit3& epipole_a() const {
│ │ │ -
126 return t_;
│ │ │ -
127 }
│ │ │ -
│ │ │ -
128
│ │ │ -
│ │ │ -
130 inline Unit3 epipole_b() const {
│ │ │ -
131 return R_.unrotate(t_);
│ │ │ -
132 }
│ │ │ +
94
│ │ │ +
96 void print(const std::string& s = "") const;
│ │ │ +
97
│ │ │ +
99 bool equals(const Pose3& pose, double tol = 1e-9) const;
│ │ │ +
100
│ │ │ +
104
│ │ │ +
│ │ │ +
106 static Pose3 Identity() {
│ │ │ +
107 return Pose3();
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
111 Pose3 inverse() const;
│ │ │ +
112
│ │ │ +
│ │ │ +
114 Pose3 operator*(const Pose3& T) const {
│ │ │ +
115 return Pose3(R_ * T.R_, t_ + R_ * T.t_);
│ │ │ +
116 }
│ │ │
│ │ │ +
117
│ │ │ +
132 Pose3 interpolateRt(const Pose3& T, double t) const;
│ │ │
133
│ │ │ -
141 GTSAM_EXPORT Point3 transformTo(const Point3& p,
│ │ │ -
142 OptionalJacobian<3, 5> DE = boost::none,
│ │ │ -
143 OptionalJacobian<3, 3> Dpoint = boost::none) const;
│ │ │ -
144
│ │ │ -
150 GTSAM_EXPORT EssentialMatrix rotate(const Rot3& cRb, OptionalJacobian<5, 5> HE =
│ │ │ -
151 boost::none, OptionalJacobian<5, 3> HR = boost::none) const;
│ │ │ -
152
│ │ │ -
│ │ │ -
158 friend EssentialMatrix operator*(const Rot3& cRb, const EssentialMatrix& E) {
│ │ │ -
159 return E.rotate(cRb);
│ │ │ -
160 }
│ │ │ -
│ │ │ -
161
│ │ │ -
163 GTSAM_EXPORT double error(const Vector3& vA, const Vector3& vB,
│ │ │ -
164 OptionalJacobian<1, 5> H = boost::none) const;
│ │ │ -
165
│ │ │ -
167
│ │ │ -
170
│ │ │ -
172 GTSAM_EXPORT friend std::ostream& operator <<(std::ostream& os, const EssentialMatrix& E);
│ │ │ -
173
│ │ │ -
175 GTSAM_EXPORT friend std::istream& operator >>(std::istream& is, EssentialMatrix& E);
│ │ │ -
176
│ │ │ -
178
│ │ │ -
179 private:
│ │ │ -
182
│ │ │ - │ │ │ -
185 template<class ARCHIVE>
│ │ │ -
186 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ -
187 ar & BOOST_SERIALIZATION_NVP(R_);
│ │ │ -
188 ar & BOOST_SERIALIZATION_NVP(t_);
│ │ │ -
189
│ │ │ -
190 ar & boost::serialization::make_nvp("E11", E_(0, 0));
│ │ │ -
191 ar & boost::serialization::make_nvp("E12", E_(0, 1));
│ │ │ -
192 ar & boost::serialization::make_nvp("E13", E_(0, 2));
│ │ │ -
193 ar & boost::serialization::make_nvp("E21", E_(1, 0));
│ │ │ -
194 ar & boost::serialization::make_nvp("E22", E_(1, 1));
│ │ │ -
195 ar & boost::serialization::make_nvp("E23", E_(1, 2));
│ │ │ -
196 ar & boost::serialization::make_nvp("E31", E_(2, 0));
│ │ │ -
197 ar & boost::serialization::make_nvp("E32", E_(2, 1));
│ │ │ -
198 ar & boost::serialization::make_nvp("E33", E_(2, 2));
│ │ │ -
199 }
│ │ │ -
200
│ │ │ +
137
│ │ │ +
139 static Pose3 Expmap(const Vector6& xi, OptionalJacobian<6, 6> Hxi = boost::none);
│ │ │ +
140
│ │ │ +
142 static Vector6 Logmap(const Pose3& pose, OptionalJacobian<6, 6> Hpose = boost::none);
│ │ │ +
143
│ │ │ +
148 Matrix6 AdjointMap() const;
│ │ │ +
149
│ │ │ +
156 Vector6 Adjoint(const Vector6& xi_b,
│ │ │ +
157 OptionalJacobian<6, 6> H_this = boost::none,
│ │ │ +
158 OptionalJacobian<6, 6> H_xib = boost::none) const;
│ │ │ +
159
│ │ │ +
161 Vector6 AdjointTranspose(const Vector6& x,
│ │ │ +
162 OptionalJacobian<6, 6> H_this = boost::none,
│ │ │ +
163 OptionalJacobian<6, 6> H_x = boost::none) const;
│ │ │ +
164
│ │ │ +
180 static Matrix6 adjointMap(const Vector6& xi);
│ │ │ +
181
│ │ │ +
185 static Vector6 adjoint(const Vector6& xi, const Vector6& y,
│ │ │ +
186 OptionalJacobian<6, 6> Hxi = boost::none,
│ │ │ +
187 OptionalJacobian<6, 6> H_y = boost::none);
│ │ │ +
188
│ │ │ +
189 // temporary fix for wrappers until case issue is resolved
│ │ │ +
190 static Matrix6 adjointMap_(const Vector6 &xi) { return adjointMap(xi);}
│ │ │ +
191 static Vector6 adjoint_(const Vector6 &xi, const Vector6 &y) { return adjoint(xi, y);}
│ │ │ +
192
│ │ │ +
196 static Vector6 adjointTranspose(const Vector6& xi, const Vector6& y,
│ │ │ +
197 OptionalJacobian<6, 6> Hxi = boost::none,
│ │ │ +
198 OptionalJacobian<6, 6> H_y = boost::none);
│ │ │ +
199
│ │ │ +
201 static Matrix6 ExpmapDerivative(const Vector6& xi);
│ │ │
202
│ │ │ -
203 public:
│ │ │ - │ │ │ -
205};
│ │ │ -
│ │ │ -
206
│ │ │ -
207template<>
│ │ │ -
208struct traits<EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
│ │ │ -
209
│ │ │ -
210template<>
│ │ │ -
211struct traits<const EssentialMatrix> : public internal::Manifold<EssentialMatrix> {};
│ │ │ -
212
│ │ │ -
213} // namespace gtsam
│ │ │ -
214
│ │ │ -
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ -
Base class and basic functions for Manifold types.
│ │ │ -
3D Pose
│ │ │ -
2D Point
│ │ │ +
204 static Matrix6 LogmapDerivative(const Pose3& xi);
│ │ │ +
205
│ │ │ +
206 // Chart at origin, depends on compile-time flag GTSAM_POSE3_EXPMAP
│ │ │ +
│ │ │ + │ │ │ +
208 static Pose3 Retract(const Vector6& xi, ChartJacobian Hxi = boost::none);
│ │ │ +
209 static Vector6 Local(const Pose3& pose, ChartJacobian Hpose = boost::none);
│ │ │ +
210 };
│ │ │ +
│ │ │ +
211
│ │ │ +
221 static Matrix3 ComputeQforExpmapDerivative(
│ │ │ +
222 const Vector6& xi, double nearZeroThreshold = 1e-5);
│ │ │ +
223
│ │ │ +
224 using LieGroup<Pose3, 6>::inverse; // version with derivative
│ │ │ +
225
│ │ │ +
│ │ │ +
233 static Matrix wedge(double wx, double wy, double wz, double vx, double vy,
│ │ │ +
234 double vz) {
│ │ │ +
235 return (Matrix(4, 4) << 0., -wz, wy, vx, wz, 0., -wx, vy, -wy, wx, 0., vz, 0., 0., 0., 0.).finished();
│ │ │ +
236 }
│ │ │ +
│ │ │ +
237
│ │ │ +
241
│ │ │ +
249 Point3 transformFrom(const Point3& point, OptionalJacobian<3, 6> Hself =
│ │ │ +
250 boost::none, OptionalJacobian<3, 3> Hpoint = boost::none) const;
│ │ │ +
251
│ │ │ +
257 Matrix transformFrom(const Matrix& points) const;
│ │ │ +
258
│ │ │ +
│ │ │ +
260 inline Point3 operator*(const Point3& point) const {
│ │ │ +
261 return transformFrom(point);
│ │ │ +
262 }
│ │ │ +
│ │ │ +
263
│ │ │ +
271 Point3 transformTo(const Point3& point, OptionalJacobian<3, 6> Hself =
│ │ │ +
272 boost::none, OptionalJacobian<3, 3> Hpoint = boost::none) const;
│ │ │ +
273
│ │ │ +
279 Matrix transformTo(const Matrix& points) const;
│ │ │ +
280
│ │ │ +
284
│ │ │ +
286 const Rot3& rotation(OptionalJacobian<3, 6> Hself = boost::none) const;
│ │ │ +
287
│ │ │ +
289 const Point3& translation(OptionalJacobian<3, 6> Hself = boost::none) const;
│ │ │ +
290
│ │ │ +
│ │ │ +
292 double x() const {
│ │ │ +
293 return t_.x();
│ │ │ +
294 }
│ │ │ +
│ │ │ +
295
│ │ │ +
│ │ │ +
297 double y() const {
│ │ │ +
298 return t_.y();
│ │ │ +
299 }
│ │ │ +
│ │ │ +
300
│ │ │ +
│ │ │ +
302 double z() const {
│ │ │ +
303 return t_.z();
│ │ │ +
304 }
│ │ │ +
│ │ │ +
305
│ │ │ +
307 Matrix4 matrix() const;
│ │ │ +
308
│ │ │ +
314 Pose3 transformPoseFrom(const Pose3& aTb, OptionalJacobian<6, 6> Hself = boost::none,
│ │ │ +
315 OptionalJacobian<6, 6> HaTb = boost::none) const;
│ │ │ +
316
│ │ │ +
321 Pose3 transformPoseTo(const Pose3& wTb, OptionalJacobian<6, 6> Hself = boost::none,
│ │ │ +
322 OptionalJacobian<6, 6> HwTb = boost::none) const;
│ │ │ +
323
│ │ │ +
329 double range(const Point3& point, OptionalJacobian<1, 6> Hself = boost::none,
│ │ │ +
330 OptionalJacobian<1, 3> Hpoint = boost::none) const;
│ │ │ +
331
│ │ │ +
337 double range(const Pose3& pose, OptionalJacobian<1, 6> Hself = boost::none,
│ │ │ +
338 OptionalJacobian<1, 6> Hpose = boost::none) const;
│ │ │ +
339
│ │ │ +
345 Unit3 bearing(const Point3& point, OptionalJacobian<2, 6> Hself = boost::none,
│ │ │ +
346 OptionalJacobian<2, 3> Hpoint = boost::none) const;
│ │ │ +
347
│ │ │ +
354 Unit3 bearing(const Pose3& pose, OptionalJacobian<2, 6> Hself = boost::none,
│ │ │ +
355 OptionalJacobian<2, 6> Hpose = boost::none) const;
│ │ │ +
356
│ │ │ +
360
│ │ │ +
│ │ │ +
366 inline static std::pair<size_t, size_t> translationInterval() {
│ │ │ +
367 return std::make_pair(3, 5);
│ │ │ +
368 }
│ │ │ +
│ │ │ +
369
│ │ │ +
│ │ │ +
375 static std::pair<size_t, size_t> rotationInterval() {
│ │ │ +
376 return std::make_pair(0, 2);
│ │ │ +
377 }
│ │ │ +
│ │ │ +
378
│ │ │ +
384 Pose3 slerp(double t, const Pose3& other, OptionalJacobian<6, 6> Hx = boost::none,
│ │ │ +
385 OptionalJacobian<6, 6> Hy = boost::none) const;
│ │ │ +
386
│ │ │ +
388 GTSAM_EXPORT
│ │ │ +
389 friend std::ostream &operator<<(std::ostream &os, const Pose3& p);
│ │ │ +
390
│ │ │ +
391 private:
│ │ │ +
393 friend class boost::serialization::access;
│ │ │ +
394 template<class Archive>
│ │ │ +
395 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ +
396 ar & BOOST_SERIALIZATION_NVP(R_);
│ │ │ +
397 ar & BOOST_SERIALIZATION_NVP(t_);
│ │ │ +
398 }
│ │ │ +
400
│ │ │ +
401#ifdef GTSAM_USE_QUATERNIONS
│ │ │ +
402 // Align if we are using Quaternions
│ │ │ +
403 public:
│ │ │ + │ │ │ +
405#endif
│ │ │ +
406};
│ │ │ +
│ │ │ +
407// Pose3 class
│ │ │ +
408
│ │ │ +
416template<>
│ │ │ +
│ │ │ +
417inline Matrix wedge<Pose3>(const Vector& xi) {
│ │ │ +
418 return Pose3::wedge(xi(0), xi(1), xi(2), xi(3), xi(4), xi(5));
│ │ │ +
419}
│ │ │ +
│ │ │ +
420
│ │ │ +
421// Convenience typedef
│ │ │ +
422using Pose3Pair = std::pair<Pose3, Pose3>;
│ │ │ +
423using Pose3Pairs = std::vector<std::pair<Pose3, Pose3> >;
│ │ │ +
424
│ │ │ +
425// For MATLAB wrapper
│ │ │ +
426typedef std::vector<Pose3> Pose3Vector;
│ │ │ +
427
│ │ │ +
428template <>
│ │ │ +
429struct traits<Pose3> : public internal::LieGroup<Pose3> {};
│ │ │ +
430
│ │ │ +
431template <>
│ │ │ +
432struct traits<const Pose3> : public internal::LieGroup<Pose3> {};
│ │ │ +
433
│ │ │ +
434// bearing and range traits, used in RangeFactor
│ │ │ +
435template <>
│ │ │ +
436struct Bearing<Pose3, Point3> : HasBearing<Pose3, Point3, Unit3> {};
│ │ │ +
437
│ │ │ +
438template<>
│ │ │ +
439struct Bearing<Pose3, Pose3> : HasBearing<Pose3, Pose3, Unit3> {};
│ │ │ +
440
│ │ │ +
441template <typename T>
│ │ │ +
442struct Range<Pose3, T> : HasRange<Pose3, T, double> {};
│ │ │ +
443
│ │ │ +
444} // namespace gtsam
│ │ │ +
Base class and basic functions for Lie types.
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ +
3D rotation represented as a rotation matrix or quaternion
│ │ │ +
Bearing-Range product.
│ │ │ +
3D Point
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
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
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │
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
│ │ │ +
Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose, OptionalJacobian< 4, 4 > Dline)
Transform a line from world to camera frame.
Definition Line3.cpp:94
│ │ │ +
Matrix wedge< Pose3 >(const Vector &xi)
wedge for Pose3:
Definition Pose3.h:417
│ │ │
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
│ │ │ -
Class retract(const TangentVector &v) const
retract as required by manifold concept: applies v at *this
Definition Lie.h:131
│ │ │ -
Both ManifoldTraits and Testable.
Definition Manifold.h:120
│ │ │ +
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
│ │ │ -
An essential matrix is like a Pose3, except with translation up to scale It is named after the 3*3 ma...
Definition EssentialMatrix.h:26
│ │ │ -
friend EssentialMatrix operator*(const Rot3 &cRb, const EssentialMatrix &E)
Given essential matrix E in camera frame B, convert to body frame C.
Definition EssentialMatrix.h:158
│ │ │ -
const Rot3 & rotation() const
Rotation.
Definition EssentialMatrix.h:110
│ │ │ -
Vector5 localCoordinates(const EssentialMatrix &other) const
Compute the coordinates in the tangent space.
Definition EssentialMatrix.h:97
│ │ │ -
bool equals(const EssentialMatrix &other, double tol=1e-8) const
assert equality up to a tolerance
Definition EssentialMatrix.h:76
│ │ │ -
EssentialMatrix()
Default constructor.
Definition EssentialMatrix.h:42
│ │ │ -
static GTSAM_EXPORT EssentialMatrix FromPose3(const Pose3 &_1P2_, OptionalJacobian< 5, 6 > H=boost::none)
Named constructor converting a Pose3 with scale to EssentialMatrix (no scale)
Definition EssentialMatrix.cpp:27
│ │ │ -
GTSAM_EXPORT friend std::istream & operator>>(std::istream &is, EssentialMatrix &E)
stream from stream
Definition EssentialMatrix.cpp:126
│ │ │ -
static EssentialMatrix Random(Engine &rng)
Random, using Rot3::Random and Unit3::Random.
Definition EssentialMatrix.h:61
│ │ │ -
static GTSAM_EXPORT EssentialMatrix FromRotationAndDirection(const Rot3 &aRb, const Unit3 &aTb, OptionalJacobian< 5, 3 > H1=boost::none, OptionalJacobian< 5, 2 > H2=boost::none)
Named constructor with derivatives.
Definition EssentialMatrix.cpp:16
│ │ │ -
GTSAM_EXPORT double error(const Vector3 &vA, const Vector3 &vB, OptionalJacobian< 1, 5 > H=boost::none) const
epipolar error, algebraic
Definition EssentialMatrix.cpp:104
│ │ │ -
EssentialMatrix retract(const Vector5 &xi) const
Retract delta to manifold.
Definition EssentialMatrix.h:92
│ │ │ -
EssentialMatrix(const Rot3 &aRb, const Unit3 &aTb)
Construct from rotation and translation.
Definition EssentialMatrix.h:46
│ │ │ -
GTSAM_EXPORT void print(const std::string &s="") const
print with optional string
Definition EssentialMatrix.cpp:48
│ │ │ -
static Vector3 Homogeneous(const Point2 &p)
Static function to convert Point2 to homogeneous coordinates.
Definition EssentialMatrix.h:34
│ │ │ -
const Unit3 & epipole_a() const
Return epipole in image_a , as Unit3 to allow for infinity.
Definition EssentialMatrix.h:125
│ │ │ -
const Unit3 & direction() const
Direction.
Definition EssentialMatrix.h:115
│ │ │ -
friend class boost::serialization::access
Serialization function.
Definition EssentialMatrix.h:184
│ │ │ -
GTSAM_EXPORT Point3 transformTo(const Point3 &p, OptionalJacobian< 3, 5 > DE=boost::none, OptionalJacobian< 3, 3 > Dpoint=boost::none) const
takes point in world coordinates and transforms it to pose with |t|==1
Definition EssentialMatrix.cpp:55
│ │ │ -
Unit3 epipole_b() const
Return epipole in image_b, as Unit3 to allow for infinity.
Definition EssentialMatrix.h:130
│ │ │ -
GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const EssentialMatrix &E)
stream to stream
Definition EssentialMatrix.cpp:117
│ │ │ -
const Matrix3 & matrix() const
Return 3*3 matrix representation.
Definition EssentialMatrix.h:120
│ │ │ -
GTSAM_EXPORT EssentialMatrix rotate(const Rot3 &cRb, OptionalJacobian< 5, 5 > HE=boost::none, OptionalJacobian< 5, 3 > HR=boost::none) const
Given essential matrix E in camera frame B, convert to body frame C.
Definition EssentialMatrix.cpp:73
│ │ │ +
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
│ │ │
A 3D pose (R,t) : (Rot3,Point3)
Definition Pose3.h:37
│ │ │ +
static Pose3 Identity()
identity for group operation
Definition Pose3.h:106
│ │ │ +
Pose3(const Pose3 &pose)
Copy constructor.
Definition Pose3.h:58
│ │ │ +
Pose3()
Default constructor is origin.
Definition Pose3.h:55
│ │ │ +
static Matrix wedge(double wx, double wy, double wz, double vx, double vy, double vz)
wedge for Pose3:
Definition Pose3.h:233
│ │ │ +
Pose3(const Rot3 &R, const Point3 &t)
Construct from R,t.
Definition Pose3.h:63
│ │ │ +
Pose3(const Matrix &T)
Constructor from 4*4 matrix.
Definition Pose3.h:71
│ │ │ +
double z() const
get z
Definition Pose3.h:302
│ │ │ +
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 Pose3.h:375
│ │ │ +
Pose3 operator*(const Pose3 &T) const
compose syntactic sugar
Definition Pose3.h:114
│ │ │ +
Rot3 Rotation
Pose Concept requirements.
Definition Pose3.h:41
│ │ │ +
double y() const
get y
Definition Pose3.h:297
│ │ │ +
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 Pose3.h:366
│ │ │ +
Point3 operator*(const Point3 &point) const
syntactic sugar for transformFrom
Definition Pose3.h:260
│ │ │ +
double x() const
get x
Definition Pose3.h:292
│ │ │ +
Definition Pose3.h:207
│ │ │
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Definition Rot3.h:58
│ │ │ -
bool equals(const Rot3 &p, double tol=1e-9) const
equals with an tolerance
Definition Rot3.cpp:100
│ │ │ -
Point3 unrotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
rotate point from world to rotated frame
Definition Rot3.cpp:136
│ │ │ -
static Rot3 Random(std::mt19937 &rng)
Random, generates a random axis, then random angle [-pi,pi] Example: std::mt19937 engine(42); Unit3 ...
Definition Rot3.cpp:40
│ │ │
Represents a 3D point on a unit sphere.
Definition Unit3.h:43
│ │ │ -
Unit3 retract(const Vector2 &v, OptionalJacobian< 2, 2 > H=boost::none) const
The retract function.
Definition Unit3.cpp:255
│ │ │ -
bool equals(const Unit3 &s, double tol=1e-9) const
The equals function with tolerance.
Definition Unit3.h:115
│ │ │ -
static Unit3 Random(std::mt19937 &rng)
Random direction, using boost::uniform_on_sphere Example: std::mt19937 engine(42); Unit3 unit = Unit3...
Definition Unit3.cpp:55
│ │ │ -
Vector2 localCoordinates(const Unit3 &s) const
The local coordinates function.
Definition Unit3.cpp:285
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,355 +1,402 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -EssentialMatrix.h │ │ │ │ -1/* │ │ │ │ -2 * @file EssentialMatrix.h │ │ │ │ -3 * @brief EssentialMatrix class │ │ │ │ -4 * @author Frank Dellaert │ │ │ │ -5 * @date December 17, 2013 │ │ │ │ -6 */ │ │ │ │ +Pose3.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#pragma once │ │ │ │ +8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ -10#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_s_e_3_._h> │ │ │ │ -11#include │ │ │ │ -12#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -13#include <_g_t_s_a_m_/_b_a_s_e_/_M_a_n_i_f_o_l_d_._h> │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18namespace _g_t_s_a_m { │ │ │ │ +10 * ------------------------------------------------------------------------- │ │ │ │ +- */ │ │ │ │ +11 │ │ │ │ +17// \callgraph │ │ │ │ +18#pragma once │ │ │ │ 19 │ │ │ │ -_2_6class _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x { │ │ │ │ -27 private: │ │ │ │ -28 _R_o_t_3 R_; │ │ │ │ -29 _U_n_i_t_3 t_; │ │ │ │ -30 Matrix3 E_; │ │ │ │ +20#include │ │ │ │ +21 │ │ │ │ +22#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> │ │ │ │ +23#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_3_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_R_o_t_3_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_b_a_s_e_/_L_i_e_._h> │ │ │ │ +26 │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ +28 │ │ │ │ +29class Pose2; │ │ │ │ +30// forward declare │ │ │ │ 31 │ │ │ │ -32 public: │ │ │ │ -_3_4 static Vector3 _H_o_m_o_g_e_n_e_o_u_s(const _P_o_i_n_t_2& p) { │ │ │ │ -35 return Vector3(p.x(), p.y(), 1); │ │ │ │ -36 } │ │ │ │ -37 │ │ │ │ -40 │ │ │ │ -_4_2 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x() :E_(t_.skew()) { │ │ │ │ -43 } │ │ │ │ -44 │ │ │ │ -_4_6 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(const _R_o_t_3& aRb, const _U_n_i_t_3& aTb) : │ │ │ │ -47 R_(aRb), t_(aTb), E_(t_.skew() * R_._m_a_t_r_i_x()) { │ │ │ │ -48 } │ │ │ │ -49 │ │ │ │ -51 GTSAM_EXPORT static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _F_r_o_m_R_o_t_a_t_i_o_n_A_n_d_D_i_r_e_c_t_i_o_n(const _R_o_t_3& │ │ │ │ -aRb, const _U_n_i_t_3& aTb, │ │ │ │ -52 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _3_> H1 = boost::none, │ │ │ │ -53 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _2_> H2 = boost::none); │ │ │ │ -54 │ │ │ │ -56 GTSAM_EXPORT static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _F_r_o_m_P_o_s_e_3(const _P_o_s_e_3& _1P2_, │ │ │ │ -57 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _6_> H = boost::none); │ │ │ │ -58 │ │ │ │ -60 template │ │ │ │ -_6_1 static _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _R_a_n_d_o_m(Engine & rng) { │ │ │ │ -62 return _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(_R_o_t_3_:_:_R_a_n_d_o_m(rng), _U_n_i_t_3_:_:_R_a_n_d_o_m(rng)); │ │ │ │ -63 } │ │ │ │ -64 │ │ │ │ -65 virtual _~_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x() {} │ │ │ │ +_3_7class GTSAM_EXPORT _P_o_s_e_3: public _L_i_e_G_r_o_u_p { │ │ │ │ +38public: │ │ │ │ +39 │ │ │ │ +_4_1 typedef _R_o_t_3 _R_o_t_a_t_i_o_n; │ │ │ │ +42 typedef _P_o_i_n_t_3 Translation; │ │ │ │ +43 │ │ │ │ +44private: │ │ │ │ +45 │ │ │ │ +46 _R_o_t_3 R_; │ │ │ │ +47 _P_o_i_n_t_3 t_; │ │ │ │ +48 │ │ │ │ +49public: │ │ │ │ +50 │ │ │ │ +53 │ │ │ │ +_5_5 _P_o_s_e_3() : R_(_t_r_a_i_t_s<_R_o_t_3>::Identity()), t_(_t_r_a_i_t_s<_P_o_i_n_t_3>::Identity()) {} │ │ │ │ +56 │ │ │ │ +_5_8 _P_o_s_e_3(const _P_o_s_e_3& pose) : │ │ │ │ +59 R_(pose.R_), t_(pose.t_) { │ │ │ │ +60 } │ │ │ │ +61 │ │ │ │ +_6_3 _P_o_s_e_3(const _R_o_t_3& R, const _P_o_i_n_t_3& t) : │ │ │ │ +64 R_(R), t_(t) { │ │ │ │ +65 } │ │ │ │ 66 │ │ │ │ -68 │ │ │ │ -71 │ │ │ │ -73 GTSAM_EXPORT void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ -74 │ │ │ │ -_7_6 bool _e_q_u_a_l_s(const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& other, double tol = 1e-8) const { │ │ │ │ -77 return R_._e_q_u_a_l_s(other.R_, tol) │ │ │ │ -78 && t_._e_q_u_a_l_s(other.t_, tol); │ │ │ │ -79 } │ │ │ │ +68 explicit _P_o_s_e_3(const _P_o_s_e_2& pose2); │ │ │ │ +69 │ │ │ │ +_7_1 _P_o_s_e_3(const Matrix &T) : │ │ │ │ +72 R_(T(0, 0), T(0, 1), T(0, 2), T(1, 0), T(1, 1), T(1, 2), T(2, 0), T(2, 1), │ │ │ │ +73 T(2, 2)), t_(T(0, 3), T(1, 3), T(2, 3)) { │ │ │ │ +74 } │ │ │ │ +75 │ │ │ │ +77 static _P_o_s_e_3 Create(const _R_o_t_3& R, const _P_o_i_n_t_3& t, │ │ │ │ +78 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _3_> HR = boost::none, │ │ │ │ +79 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _3_> Ht = boost::none); │ │ │ │ 80 │ │ │ │ -82 │ │ │ │ -85 enum { dimension = 5 }; │ │ │ │ -86 inline static size_t Dim() { return dimension;} │ │ │ │ -87 inline size_t dim() const { return dimension;} │ │ │ │ -88 │ │ │ │ -89 typedef OptionalJacobian ChartJacobian; │ │ │ │ +86 static boost::optional Align(const Point3Pairs& abPointPairs); │ │ │ │ +87 │ │ │ │ +88 // Version of Pose3::Align that takes 2 matrices. │ │ │ │ +89 static boost::optional Align(const Matrix& a, const Matrix& b); │ │ │ │ 90 │ │ │ │ -_9_2 _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _r_e_t_r_a_c_t(const Vector5& xi) const { │ │ │ │ -93 return _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x(R_._r_e_t_r_a_c_t(xi.head<3>()), t_._r_e_t_r_a_c_t(xi.tail<2>())); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -_9_7 Vector5 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& other) const { │ │ │ │ -98 auto v1 = R_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(other.R_); │ │ │ │ -99 auto v2 = t_._l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(other.t_); │ │ │ │ -100 Vector5 v; │ │ │ │ -101 v << v1, v2; │ │ │ │ -102 return v; │ │ │ │ -103 } │ │ │ │ -105 │ │ │ │ -108 │ │ │ │ -_1_1_0 inline const _R_o_t_3& _r_o_t_a_t_i_o_n() const { │ │ │ │ -111 return R_; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -_1_1_5 inline const _U_n_i_t_3& _d_i_r_e_c_t_i_o_n() const { │ │ │ │ -116 return t_; │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -_1_2_0 inline const Matrix3& _m_a_t_r_i_x() const { │ │ │ │ -121 return E_; │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -_1_2_5 inline const _U_n_i_t_3& _e_p_i_p_o_l_e___a() const { │ │ │ │ -126 return t_; │ │ │ │ -127 } │ │ │ │ -128 │ │ │ │ -_1_3_0 inline _U_n_i_t_3 _e_p_i_p_o_l_e___b() const { │ │ │ │ -131 return R_._u_n_r_o_t_a_t_e(t_); │ │ │ │ -132 } │ │ │ │ +94 │ │ │ │ +96 void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ +97 │ │ │ │ +99 bool _e_q_u_a_l_s(const _P_o_s_e_3& pose, double tol = 1e-9) const; │ │ │ │ +100 │ │ │ │ +104 │ │ │ │ +_1_0_6 static _P_o_s_e_3 _I_d_e_n_t_i_t_y() { │ │ │ │ +107 return _P_o_s_e_3(); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +111 _P_o_s_e_3 inverse() const; │ │ │ │ +112 │ │ │ │ +_1_1_4 _P_o_s_e_3 _o_p_e_r_a_t_o_r_*(const _P_o_s_e_3& T) const { │ │ │ │ +115 return _P_o_s_e_3(R_ * T.R_, t_ + R_ * T.t_); │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +132 _P_o_s_e_3 interpolateRt(const _P_o_s_e_3& T, double t) const; │ │ │ │ 133 │ │ │ │ -141 GTSAM_EXPORT _P_o_i_n_t_3 _t_r_a_n_s_f_o_r_m_T_o(const _P_o_i_n_t_3& p, │ │ │ │ -142 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _5_> DE = boost::none, │ │ │ │ -143 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> Dpoint = boost::none) const; │ │ │ │ -144 │ │ │ │ -150 GTSAM_EXPORT _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _r_o_t_a_t_e(const _R_o_t_3& cRb, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _5_> │ │ │ │ -HE = │ │ │ │ -151 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_5_,_ _3_> HR = boost::none) const; │ │ │ │ -152 │ │ │ │ -_1_5_8 friend _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x _o_p_e_r_a_t_o_r_*(const _R_o_t_3& cRb, const _E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E) │ │ │ │ -{ │ │ │ │ -159 return E.rotate(cRb); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -163 GTSAM_EXPORT double _e_r_r_o_r(const Vector3& vA, const Vector3& vB, │ │ │ │ -164 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _5_> H = boost::none) const; │ │ │ │ -165 │ │ │ │ -167 │ │ │ │ -170 │ │ │ │ -172 GTSAM_EXPORT friend std::ostream& _o_p_e_r_a_t_o_r_ _<_<(std::ostream& os, const │ │ │ │ -_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E); │ │ │ │ -173 │ │ │ │ -175 GTSAM_EXPORT friend std::istream& _o_p_e_r_a_t_o_r_ _>_>(std::istream& is, │ │ │ │ -_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x& E); │ │ │ │ -176 │ │ │ │ -178 │ │ │ │ -179 private: │ │ │ │ -182 │ │ │ │ -_1_8_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; │ │ │ │ -185 template │ │ │ │ -186 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ -187 ar & BOOST_SERIALIZATION_NVP(R_); │ │ │ │ -188 ar & BOOST_SERIALIZATION_NVP(t_); │ │ │ │ -189 │ │ │ │ -190 ar & boost::serialization::make_nvp("E11", E_(0, 0)); │ │ │ │ -191 ar & boost::serialization::make_nvp("E12", E_(0, 1)); │ │ │ │ -192 ar & boost::serialization::make_nvp("E13", E_(0, 2)); │ │ │ │ -193 ar & boost::serialization::make_nvp("E21", E_(1, 0)); │ │ │ │ -194 ar & boost::serialization::make_nvp("E22", E_(1, 1)); │ │ │ │ -195 ar & boost::serialization::make_nvp("E23", E_(1, 2)); │ │ │ │ -196 ar & boost::serialization::make_nvp("E31", E_(2, 0)); │ │ │ │ -197 ar & boost::serialization::make_nvp("E32", E_(2, 1)); │ │ │ │ -198 ar & boost::serialization::make_nvp("E33", E_(2, 2)); │ │ │ │ -199 } │ │ │ │ -200 │ │ │ │ +137 │ │ │ │ +139 static _P_o_s_e_3 Expmap(const Vector6& xi, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hxi = boost:: │ │ │ │ +none); │ │ │ │ +140 │ │ │ │ +142 static Vector6 Logmap(const _P_o_s_e_3& pose, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hpose = │ │ │ │ +boost::none); │ │ │ │ +143 │ │ │ │ +148 Matrix6 AdjointMap() const; │ │ │ │ +149 │ │ │ │ +156 Vector6 Adjoint(const Vector6& xi_b, │ │ │ │ +157 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H_this = boost::none, │ │ │ │ +158 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H_xib = boost::none) const; │ │ │ │ +159 │ │ │ │ +161 Vector6 AdjointTranspose(const Vector6& x, │ │ │ │ +162 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H_this = boost::none, │ │ │ │ +163 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H_x = boost::none) const; │ │ │ │ +164 │ │ │ │ +180 static Matrix6 adjointMap(const Vector6& xi); │ │ │ │ +181 │ │ │ │ +185 static Vector6 adjoint(const Vector6& xi, const Vector6& y, │ │ │ │ +186 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hxi = boost::none, │ │ │ │ +187 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> H_y = boost::none); │ │ │ │ +188 │ │ │ │ +189 // temporary fix for wrappers until case issue is resolved │ │ │ │ +190 static Matrix6 adjointMap_(const Vector6 &xi) { return adjointMap(xi);} │ │ │ │ +191 static Vector6 adjoint_(const Vector6 &xi, const Vector6 &y) { return │ │ │ │ +adjoint(xi, y);} │ │ │ │ +192 │ │ │ │ +196 static Vector6 adjointTranspose(const Vector6& xi, const Vector6& y, │ │ │ │ +197 OptionalJacobian<6, 6> Hxi = boost::none, │ │ │ │ +198 OptionalJacobian<6, 6> H_y = boost::none); │ │ │ │ +199 │ │ │ │ +201 static Matrix6 ExpmapDerivative(const Vector6& xi); │ │ │ │ 202 │ │ │ │ -203 public: │ │ │ │ -204 _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 │ │ │ │ -205}; │ │ │ │ -206 │ │ │ │ -207template<> │ │ │ │ -_2_0_8struct _t_r_a_i_t_s<_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ -{}; │ │ │ │ -209 │ │ │ │ -210template<> │ │ │ │ -_2_1_1struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ -_M_a_n_i_f_o_l_d {}; │ │ │ │ -212 │ │ │ │ -213} // namespace gtsam │ │ │ │ -214 │ │ │ │ +204 static Matrix6 LogmapDerivative(const Pose3& xi); │ │ │ │ +205 │ │ │ │ +206 // Chart at origin, depends on compile-time flag GTSAM_POSE3_EXPMAP │ │ │ │ +_2_0_7 struct _C_h_a_r_t_A_t_O_r_i_g_i_n { │ │ │ │ +208 static _P_o_s_e_3 Retract(const Vector6& xi, ChartJacobian Hxi = boost::none); │ │ │ │ +209 static Vector6 Local(const _P_o_s_e_3& pose, ChartJacobian Hpose = boost::none); │ │ │ │ +210 }; │ │ │ │ +211 │ │ │ │ +221 static Matrix3 ComputeQforExpmapDerivative( │ │ │ │ +222 const Vector6& xi, double nearZeroThreshold = 1e-5); │ │ │ │ +223 │ │ │ │ +224 using _L_i_e_G_r_o_u_p<_P_o_s_e_3, 6>::inverse; // version with derivative │ │ │ │ +225 │ │ │ │ +_2_3_3 static Matrix _w_e_d_g_e(double wx, double wy, double wz, double vx, double vy, │ │ │ │ +234 double vz) { │ │ │ │ +235 return (Matrix(4, 4) << 0., -wz, wy, vx, wz, 0., -wx, vy, -wy, wx, 0., vz, │ │ │ │ +0., 0., 0., 0.).finished(); │ │ │ │ +236 } │ │ │ │ +237 │ │ │ │ +241 │ │ │ │ +249 _P_o_i_n_t_3 transformFrom(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_> Hself = │ │ │ │ +250 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> Hpoint = boost::none) const; │ │ │ │ +251 │ │ │ │ +257 Matrix transformFrom(const Matrix& points) const; │ │ │ │ +258 │ │ │ │ +_2_6_0 inline _P_o_i_n_t_3 _o_p_e_r_a_t_o_r_*(const _P_o_i_n_t_3& point) const { │ │ │ │ +261 return transformFrom(point); │ │ │ │ +262 } │ │ │ │ +263 │ │ │ │ +271 _P_o_i_n_t_3 _t_r_a_n_s_f_o_r_m_T_o(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_> Hself = │ │ │ │ +272 boost::none, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _3_> Hpoint = boost::none) const; │ │ │ │ +273 │ │ │ │ +279 Matrix _t_r_a_n_s_f_o_r_m_T_o(const Matrix& points) const; │ │ │ │ +280 │ │ │ │ +284 │ │ │ │ +286 const _R_o_t_3& rotation(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> Hself = boost::none) const; │ │ │ │ +287 │ │ │ │ +289 const _P_o_i_n_t_3& translation(_O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_3_,_ _6_> Hself = boost::none) │ │ │ │ +const; │ │ │ │ +290 │ │ │ │ +_2_9_2 double _x() const { │ │ │ │ +293 return t_.x(); │ │ │ │ +294 } │ │ │ │ +295 │ │ │ │ +_2_9_7 double _y() const { │ │ │ │ +298 return t_.y(); │ │ │ │ +299 } │ │ │ │ +300 │ │ │ │ +_3_0_2 double _z() const { │ │ │ │ +303 return t_.z(); │ │ │ │ +304 } │ │ │ │ +305 │ │ │ │ +307 Matrix4 matrix() const; │ │ │ │ +308 │ │ │ │ +314 _P_o_s_e_3 transformPoseFrom(const _P_o_s_e_3& aTb, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hself = │ │ │ │ +boost::none, │ │ │ │ +315 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> HaTb = boost::none) const; │ │ │ │ +316 │ │ │ │ +321 _P_o_s_e_3 transformPoseTo(const _P_o_s_e_3& wTb, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hself = │ │ │ │ +boost::none, │ │ │ │ +322 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> HwTb = boost::none) const; │ │ │ │ +323 │ │ │ │ +329 double range(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Hself = boost:: │ │ │ │ +none, │ │ │ │ +330 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _3_> Hpoint = boost::none) const; │ │ │ │ +331 │ │ │ │ +337 double range(const _P_o_s_e_3& pose, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Hself = boost::none, │ │ │ │ +338 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_1_,_ _6_> Hpose = boost::none) const; │ │ │ │ +339 │ │ │ │ +345 _U_n_i_t_3 bearing(const _P_o_i_n_t_3& point, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Hself = boost:: │ │ │ │ +none, │ │ │ │ +346 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _3_> Hpoint = boost::none) const; │ │ │ │ +347 │ │ │ │ +354 _U_n_i_t_3 bearing(const _P_o_s_e_3& pose, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Hself = boost:: │ │ │ │ +none, │ │ │ │ +355 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _6_> Hpose = boost::none) const; │ │ │ │ +356 │ │ │ │ +360 │ │ │ │ +_3_6_6 inline static std::pair _t_r_a_n_s_l_a_t_i_o_n_I_n_t_e_r_v_a_l() { │ │ │ │ +367 return std::make_pair(3, 5); │ │ │ │ +368 } │ │ │ │ +369 │ │ │ │ +_3_7_5 static std::pair _r_o_t_a_t_i_o_n_I_n_t_e_r_v_a_l() { │ │ │ │ +376 return std::make_pair(0, 2); │ │ │ │ +377 } │ │ │ │ +378 │ │ │ │ +384 _P_o_s_e_3 slerp(double t, const _P_o_s_e_3& other, _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hx = │ │ │ │ +boost::none, │ │ │ │ +385 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_6_,_ _6_> Hy = boost::none) const; │ │ │ │ +386 │ │ │ │ +388 GTSAM_EXPORT │ │ │ │ +389 friend std::ostream &operator<<(std::ostream &os, const _P_o_s_e_3& p); │ │ │ │ +390 │ │ │ │ +391 private: │ │ │ │ +_3_9_3 friend class boost::serialization::access; │ │ │ │ +394 template │ │ │ │ +395 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +396 ar & BOOST_SERIALIZATION_NVP(R_); │ │ │ │ +397 ar & BOOST_SERIALIZATION_NVP(t_); │ │ │ │ +398 } │ │ │ │ +400 │ │ │ │ +401#ifdef GTSAM_USE_QUATERNIONS │ │ │ │ +402 // Align if we are using Quaternions │ │ │ │ +403 public: │ │ │ │ +404 _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 │ │ │ │ +405#endif │ │ │ │ +406}; │ │ │ │ +407// Pose3 class │ │ │ │ +408 │ │ │ │ +416template<> │ │ │ │ +_4_1_7inline Matrix _w_e_d_g_e_<_P_o_s_e_3_>(const Vector& xi) { │ │ │ │ +418 return _P_o_s_e_3_:_:_w_e_d_g_e(xi(0), xi(1), xi(2), xi(3), xi(4), xi(5)); │ │ │ │ +419} │ │ │ │ +420 │ │ │ │ +421// Convenience typedef │ │ │ │ +422using Pose3Pair = std::pair; │ │ │ │ +423using Pose3Pairs = std::vector >; │ │ │ │ +424 │ │ │ │ +425// For MATLAB wrapper │ │ │ │ +426typedef std::vector Pose3Vector; │ │ │ │ +427 │ │ │ │ +428template <> │ │ │ │ +_4_2_9struct _t_r_a_i_t_s<_P_o_s_e_3> : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +430 │ │ │ │ +431template <> │ │ │ │ +_4_3_2struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_L_i_e_G_r_o_u_p {}; │ │ │ │ +433 │ │ │ │ +434// bearing and range traits, used in RangeFactor │ │ │ │ +435template <> │ │ │ │ +_4_3_6struct _B_e_a_r_i_n_g<_P_o_s_e_3, _P_o_i_n_t_3> : _H_a_s_B_e_a_r_i_n_g {}; │ │ │ │ +437 │ │ │ │ +438template<> │ │ │ │ +_4_3_9struct _B_e_a_r_i_n_g<_P_o_s_e_3, _P_o_s_e_3> : _H_a_s_B_e_a_r_i_n_g {}; │ │ │ │ +440 │ │ │ │ +441template │ │ │ │ +_4_4_2struct _R_a_n_g_e<_P_o_s_e_3, T> : _H_a_s_R_a_n_g_e {}; │ │ │ │ +443 │ │ │ │ +444} // namespace gtsam │ │ │ │ +_L_i_e_._h │ │ │ │ +Base class and basic functions for Lie types. │ │ │ │ _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 │ │ │ │ -_M_a_n_i_f_o_l_d_._h │ │ │ │ -Base class and basic functions for Manifold types. │ │ │ │ -_P_o_s_e_3_._h │ │ │ │ -3D Pose │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ +_R_o_t_3_._h │ │ │ │ +3D rotation represented as a rotation matrix or quaternion │ │ │ │ +_B_e_a_r_i_n_g_R_a_n_g_e_._h │ │ │ │ +Bearing-Range product. │ │ │ │ +_P_o_i_n_t_3_._h │ │ │ │ +3D Point │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_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_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_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_n_s_f_o_r_m_T_o │ │ │ │ +Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > │ │ │ │ +Dpose, OptionalJacobian< 4, 4 > Dline) │ │ │ │ +Transform a line from world to camera frame. │ │ │ │ +DDeeffiinniittiioonn Line3.cpp:94 │ │ │ │ +_g_t_s_a_m_:_:_w_e_d_g_e_<_ _P_o_s_e_3_ _> │ │ │ │ +Matrix wedge< Pose3 >(const Vector &xi) │ │ │ │ +wedge for Pose3: │ │ │ │ +DDeeffiinniittiioonn Pose3.h:417 │ │ │ │ _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_:_:_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_:_:_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_:_:_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_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ -An essential matrix is like a Pose3, except with translation up to scale It is │ │ │ │ -named after the 3*3 ma... │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:26 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ -friend EssentialMatrix operator*(const Rot3 &cRb, const EssentialMatrix &E) │ │ │ │ -Given essential matrix E in camera frame B, convert to body frame C. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:158 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_o_t_a_t_i_o_n │ │ │ │ -const Rot3 & rotation() const │ │ │ │ -Rotation. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:110 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector5 localCoordinates(const EssentialMatrix &other) const │ │ │ │ -Compute the coordinates in the tangent space. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:97 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const EssentialMatrix &other, double tol=1e-8) const │ │ │ │ -assert equality up to a tolerance │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:76 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ -EssentialMatrix() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:42 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_F_r_o_m_P_o_s_e_3 │ │ │ │ -static GTSAM_EXPORT EssentialMatrix FromPose3(const Pose3 &_1P2_, │ │ │ │ -OptionalJacobian< 5, 6 > H=boost::none) │ │ │ │ -Named constructor converting a Pose3 with scale to EssentialMatrix (no scale) │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:27 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_>_> │ │ │ │ -GTSAM_EXPORT friend std::istream & operator>>(std::istream &is, EssentialMatrix │ │ │ │ -&E) │ │ │ │ -stream from stream │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:126 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_R_a_n_d_o_m │ │ │ │ -static EssentialMatrix Random(Engine &rng) │ │ │ │ -Random, using Rot3::Random and Unit3::Random. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:61 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_F_r_o_m_R_o_t_a_t_i_o_n_A_n_d_D_i_r_e_c_t_i_o_n │ │ │ │ -static GTSAM_EXPORT EssentialMatrix FromRotationAndDirection(const Rot3 &aRb, │ │ │ │ -const Unit3 &aTb, OptionalJacobian< 5, 3 > H1=boost::none, OptionalJacobian< 5, │ │ │ │ -2 > H2=boost::none) │ │ │ │ -Named constructor with derivatives. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:16 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_r_r_o_r │ │ │ │ -GTSAM_EXPORT double error(const Vector3 &vA, const Vector3 &vB, │ │ │ │ -OptionalJacobian< 1, 5 > H=boost::none) const │ │ │ │ -epipolar error, algebraic │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:104 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_e_t_r_a_c_t │ │ │ │ -EssentialMatrix retract(const Vector5 &xi) const │ │ │ │ -Retract delta to manifold. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:92 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x │ │ │ │ -EssentialMatrix(const Rot3 &aRb, const Unit3 &aTb) │ │ │ │ -Construct from rotation and translation. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:46 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_p_r_i_n_t │ │ │ │ -GTSAM_EXPORT void print(const std::string &s="") const │ │ │ │ -print with optional string │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:48 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_H_o_m_o_g_e_n_e_o_u_s │ │ │ │ -static Vector3 Homogeneous(const Point2 &p) │ │ │ │ -Static function to convert Point2 to homogeneous coordinates. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:34 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_p_i_p_o_l_e___a │ │ │ │ -const Unit3 & epipole_a() const │ │ │ │ -Return epipole in image_a , as Unit3 to allow for infinity. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:125 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_d_i_r_e_c_t_i_o_n │ │ │ │ -const Unit3 & direction() const │ │ │ │ -Direction. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:115 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_a_c_c_e_s_s │ │ │ │ -friend class boost::serialization::access │ │ │ │ -Serialization function. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:184 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_t_r_a_n_s_f_o_r_m_T_o │ │ │ │ -GTSAM_EXPORT Point3 transformTo(const Point3 &p, OptionalJacobian< 3, 5 > │ │ │ │ -DE=boost::none, OptionalJacobian< 3, 3 > Dpoint=boost::none) const │ │ │ │ -takes point in world coordinates and transforms it to pose with |t|==1 │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:55 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_e_p_i_p_o_l_e___b │ │ │ │ -Unit3 epipole_b() const │ │ │ │ -Return epipole in image_b, as Unit3 to allow for infinity. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:130 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ -GTSAM_EXPORT friend std::ostream & operator<<(std::ostream &os, const │ │ │ │ -EssentialMatrix &E) │ │ │ │ -stream to stream │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:117 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_m_a_t_r_i_x │ │ │ │ -const Matrix3 & matrix() const │ │ │ │ -Return 3*3 matrix representation. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.h:120 │ │ │ │ -_g_t_s_a_m_:_:_E_s_s_e_n_t_i_a_l_M_a_t_r_i_x_:_:_r_o_t_a_t_e │ │ │ │ -GTSAM_EXPORT EssentialMatrix rotate(const Rot3 &cRb, OptionalJacobian< 5, 5 > │ │ │ │ -HE=boost::none, OptionalJacobian< 5, 3 > HR=boost::none) const │ │ │ │ -Given essential matrix E in camera frame B, convert to body frame C. │ │ │ │ -DDeeffiinniittiioonn EssentialMatrix.cpp:73 │ │ │ │ +_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_3 │ │ │ │ A 3D pose (R,t) : (Rot3,Point3) │ │ │ │ DDeeffiinniittiioonn Pose3.h:37 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_I_d_e_n_t_i_t_y │ │ │ │ +static Pose3 Identity() │ │ │ │ +identity for group operation │ │ │ │ +DDeeffiinniittiioonn Pose3.h:106 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_P_o_s_e_3 │ │ │ │ +Pose3(const Pose3 &pose) │ │ │ │ +Copy constructor. │ │ │ │ +DDeeffiinniittiioonn Pose3.h:58 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_P_o_s_e_3 │ │ │ │ +Pose3() │ │ │ │ +Default constructor is origin. │ │ │ │ +DDeeffiinniittiioonn Pose3.h:55 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_w_e_d_g_e │ │ │ │ +static Matrix wedge(double wx, double wy, double wz, double vx, double vy, │ │ │ │ +double vz) │ │ │ │ +wedge for Pose3: │ │ │ │ +DDeeffiinniittiioonn Pose3.h:233 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_P_o_s_e_3 │ │ │ │ +Pose3(const Rot3 &R, const Point3 &t) │ │ │ │ +Construct from R,t. │ │ │ │ +DDeeffiinniittiioonn Pose3.h:63 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_P_o_s_e_3 │ │ │ │ +Pose3(const Matrix &T) │ │ │ │ +Constructor from 4*4 matrix. │ │ │ │ +DDeeffiinniittiioonn Pose3.h:71 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_z │ │ │ │ +double z() const │ │ │ │ +get z │ │ │ │ +DDeeffiinniittiioonn Pose3.h:302 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_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 Pose3.h:375 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Pose3 operator*(const Pose3 &T) const │ │ │ │ +compose syntactic sugar │ │ │ │ +DDeeffiinniittiioonn Pose3.h:114 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_R_o_t_a_t_i_o_n │ │ │ │ +Rot3 Rotation │ │ │ │ +Pose Concept requirements. │ │ │ │ +DDeeffiinniittiioonn Pose3.h:41 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_y │ │ │ │ +double y() const │ │ │ │ +get y │ │ │ │ +DDeeffiinniittiioonn Pose3.h:297 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_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 Pose3.h:366 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +Point3 operator*(const Point3 &point) const │ │ │ │ +syntactic sugar for transformFrom │ │ │ │ +DDeeffiinniittiioonn Pose3.h:260 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_x │ │ │ │ +double x() const │ │ │ │ +get x │ │ │ │ +DDeeffiinniittiioonn Pose3.h:292 │ │ │ │ +_g_t_s_a_m_:_:_P_o_s_e_3_:_:_C_h_a_r_t_A_t_O_r_i_g_i_n │ │ │ │ +DDeeffiinniittiioonn Pose3.h:207 │ │ │ │ _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_:_:_e_q_u_a_l_s │ │ │ │ -bool equals(const Rot3 &p, double tol=1e-9) const │ │ │ │ -equals with an tolerance │ │ │ │ -DDeeffiinniittiioonn Rot3.cpp:100 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_u_n_r_o_t_a_t_e │ │ │ │ -Point3 unrotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, │ │ │ │ -OptionalJacobian< 3, 3 > H2=boost::none) const │ │ │ │ -rotate point from world to rotated frame │ │ │ │ -DDeeffiinniittiioonn Rot3.cpp:136 │ │ │ │ -_g_t_s_a_m_:_:_R_o_t_3_:_:_R_a_n_d_o_m │ │ │ │ -static Rot3 Random(std::mt19937 &rng) │ │ │ │ -Random, generates a random axis, then random angle [-pi,pi] Example: std:: │ │ │ │ -mt19937 engine(42); Unit3 ... │ │ │ │ -DDeeffiinniittiioonn Rot3.cpp:40 │ │ │ │ _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_:_:_r_e_t_r_a_c_t │ │ │ │ -Unit3 retract(const Vector2 &v, OptionalJacobian< 2, 2 > H=boost::none) const │ │ │ │ -The retract function. │ │ │ │ -DDeeffiinniittiioonn Unit3.cpp:255 │ │ │ │ -_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_:_:_R_a_n_d_o_m │ │ │ │ -static Unit3 Random(std::mt19937 &rng) │ │ │ │ -Random direction, using boost::uniform_on_sphere Example: std::mt19937 engine │ │ │ │ -(42); Unit3 unit = Unit3... │ │ │ │ -DDeeffiinniittiioonn Unit3.cpp:55 │ │ │ │ -_g_t_s_a_m_:_:_U_n_i_t_3_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector2 localCoordinates(const Unit3 &s) const │ │ │ │ -The local coordinates function. │ │ │ │ -DDeeffiinniittiioonn Unit3.cpp:285 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * EEsssseennttiiaallMMaattrriixx..hh │ │ │ │ + * _P_o_s_e_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/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/Cal3DS2_Base.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,114 +98,151 @@ │ │ │
No Matches
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cyclic.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/Group.h>
│ │ │ -
21#include <gtsam/base/Testable.h>
│ │ │ -
22
│ │ │ -
23#include <cassert>
│ │ │ -
24#include <iostream> // for cout :-(
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/geometry/Cal3.h>
│ │ │ + │ │ │ +
24#include <boost/shared_ptr.hpp>
│ │ │
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 }
│ │ │ -
│ │ │ -
│ │ │ -
48 Cyclic operator+(const Cyclic& h) const {
│ │ │ -
49 return (i_ + h.i_) % N;
│ │ │ -
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 }
│ │ │ -
│ │ │ -
│ │ │ -
64 bool equals(const Cyclic& other, double tol = 1e-9) const {
│ │ │ -
65 return other.i_ == i_;
│ │ │ -
66 }
│ │ │ -
│ │ │ -
67};
│ │ │ -
│ │ │ +
│ │ │ +
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
│ │ │ +
56
│ │ │ +
58 Cal3DS2_Base() = default;
│ │ │ +
59
│ │ │ +
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
│ │ │ -
70template<size_t N>
│ │ │ -
│ │ │ -
71struct traits<Cyclic<N> > : internal::AdditiveGroupTraits<Cyclic<N> >, //
│ │ │ -
72 Testable<Cyclic<N> > {
│ │ │ -
73};
│ │ │ -
│ │ │ +
69 ~Cal3DS2_Base() override {}
│ │ │ +
70
│ │ │
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.
│ │ │ +
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
│ │ │ +
142 inline static size_t Dim() { return dimension; }
│ │ │ +
143
│ │ │ +
147
│ │ │ +
│ │ │ +
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
│ │ │ -
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
│ │ │ +
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
│ │ │ +
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ +
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,118 +1,184 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cyclic.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_/_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 :-( │ │ │ │ +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 │ │ │ │ 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; │ │ │ │ -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}; │ │ │ │ +_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 using shared_ptr = boost::shared_ptr; │ │ │ │ +53 │ │ │ │ +56 │ │ │ │ +_5_8 _C_a_l_3_D_S_2___B_a_s_e() = default; │ │ │ │ +59 │ │ │ │ +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 │ │ │ │ -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}; │ │ │ │ +69 _~_C_a_l_3_D_S_2___B_a_s_e() override {} │ │ │ │ +70 │ │ │ │ 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. │ │ │ │ +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 │ │ │ │ +_1_4_2 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +143 │ │ │ │ +147 │ │ │ │ +_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_:_:_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_:_:_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_:_:_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 │ │ │ │ +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() │ │ │ │ +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 │ │ │ │ - * _C_y_c_l_i_c_._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/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/SOn-inl.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,34 +95,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
Cyclic.cpp File Reference
│ │ │ +
SOn-inl.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Cyclic group implementation. │ │ │ +

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

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Cyclic group implementation.

│ │ │ +

Template implementations for SO(n)

│ │ │
Author
Frank Dellaert
│ │ │ +
Date
March 2019
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,23 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Cyclic.cpp File Reference │ │ │ │ -Cyclic group implementation. _M_o_r_e_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Cyclic group implementation. │ │ │ │ +Template implementations for SO(n) │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ + Date │ │ │ │ + March 2019 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_y_c_l_i_c_._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/a00422.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/CameraSet.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,49 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
CameraSet.h File Reference
│ │ │ +
Rot2.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Base class to create smart factors on poses or cameras. │ │ │ +

2D Rotations │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::CameraSet< CAMERA >
 A set of cameras, all with their own calibration. More...
 
struct  gtsam::traits< CameraSet< CAMERA > >
 
struct  gtsam::traits< const CameraSet< CAMERA > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Base class to create smart factors on poses or cameras.

│ │ │ +

2D Rotations

│ │ │ +
Date
Dec 9, 2009
│ │ │
Author
Frank Dellaert
│ │ │ -
Date
Feb 19, 2015
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +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 │ │ │ │ -CameraSet.h File Reference │ │ │ │ -Base class to create smart factors on poses or 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_:_:_C_a_m_e_r_a_S_e_t_<_ _C_A_M_E_R_A_ _> │ │ │ │ -  A set of cameras, all with their own calibration. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_m_e_r_a_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_ _C_a_m_e_r_a_S_e_t_<_ _C_A_M_E_R_A_ _>_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +Rot2.cpp File Reference │ │ │ │ +2D Rotations _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Base class to create smart factors on poses or cameras. │ │ │ │ +2D Rotations │ │ │ │ + Date │ │ │ │ + Dec 9, 2009 │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Date │ │ │ │ - Feb 19, 2015 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_m_e_r_a_S_e_t_._h │ │ │ │ + * _R_o_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/a00425.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/CalibratedCamera.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,56 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
CalibratedCamera.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Cal3DS2.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

Calibrated camera for which only pose is unknown. │ │ │ -More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::CheiralityException
 
class  gtsam::PinholeBase
 A pinhole camera class that has a Pose3, functions as base class for all pinhole cameras. More...
 
class  gtsam::CalibratedCamera
 A Calibrated camera class [R|-R't], calibration K=I. More...
 
struct  gtsam::traits< CalibratedCamera >
 
struct  gtsam::traits< const CalibratedCamera >
 
struct  gtsam::Range< CalibratedCamera, T >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

Calibrated camera for which only pose is unknown.

│ │ │ -
Date
Aug 17, 2009
│ │ │ -
Author
Frank Dellaert
│ │ │ +
Date
Feb 28, 2010
│ │ │ +
Author
ydjian
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +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 │ │ │ │ -CalibratedCamera.h File Reference │ │ │ │ -Calibrated camera for which only pose is unknown. _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_i_r_a_l_i_t_y_E_x_c_e_p_t_i_o_n │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_P_i_n_h_o_l_e_B_a_s_e │ │ │ │ -  A pinhole camera class that has a _P_o_s_e_3, functions as base class for │ │ │ │ - all pinhole cameras. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a │ │ │ │ -  A Calibrated camera class [R|-R't], calibration K=I. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_R_a_n_g_e_<_ _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_,_ _T_ _> │ │ │ │ -  │ │ │ │ +_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 ********** │ │ │ │ -Calibrated camera for which only pose is unknown. │ │ │ │ Date │ │ │ │ - Aug 17, 2009 │ │ │ │ + Feb 28, 2010 │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + ydjian │ │ │ │ + Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_i_b_r_a_t_e_d_C_a_m_e_r_a_._h │ │ │ │ + * _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/a00431_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2Stereo.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Unit3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,163 +98,245 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3_S2Stereo.h
│ │ │ +
Unit3.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
│ │ │ +
3 * Atlanta, Georgia 30332-0415
│ │ │ +
4 * All Rights Reserved
│ │ │ +
5 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │
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#include <iosfwd>
│ │ │ +
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
│ │ │ -
23namespace gtsam {
│ │ │ -
24
│ │ │ -
│ │ │ -
30class GTSAM_EXPORT Cal3_S2Stereo : public Cal3_S2 {
│ │ │ -
31 private:
│ │ │ -
32 double b_ = 1.0f;
│ │ │ -
33
│ │ │ -
34 public:
│ │ │ -
35 enum { dimension = 6 };
│ │ │ -
36
│ │ │ -
38 using shared_ptr = boost::shared_ptr<Cal3_S2Stereo>;
│ │ │ + │ │ │ + │ │ │ +
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
│ │ │ -
42
│ │ │ -
44 Cal3_S2Stereo() = default;
│ │ │ -
45
│ │ │ -
│ │ │ -
47 Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
│ │ │ -
48 : Cal3_S2(fx, fy, s, u0, v0), b_(b) {}
│ │ │ -
│ │ │ -
49
│ │ │ -
│ │ │ -
51 Cal3_S2Stereo(const Vector6& d)
│ │ │ -
52 : Cal3_S2(d(0), d(1), d(2), d(3), d(4)), b_(d(5)) {}
│ │ │ -
│ │ │ -
53
│ │ │ -
│ │ │ -
55 Cal3_S2Stereo(double fov, int w, int h, double b)
│ │ │ -
56 : Cal3_S2(fov, w, h), b_(b) {}
│ │ │ -
│ │ │ -
57
│ │ │ -
59
│ │ │ -
67 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 6> Dcal = boost::none,
│ │ │ -
68 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
69
│ │ │ -
77 Point2 calibrate(const Point2& p, OptionalJacobian<2, 6> Dcal = boost::none,
│ │ │ -
78 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
79
│ │ │ -
85 Vector3 calibrate(const Vector3& p) const { return Cal3_S2::calibrate(p); }
│ │ │ -
86
│ │ │ -
89
│ │ │ -
91 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
92 const Cal3_S2Stereo& cal);
│ │ │ -
93
│ │ │ -
95 void print(const std::string& s = "") const override;
│ │ │ -
96
│ │ │ -
98 bool equals(const Cal3_S2Stereo& other, double tol = 10e-9) const;
│ │ │ -
99
│ │ │ +
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
│ │ │ +
54
│ │ │ +
55public:
│ │ │ +
56
│ │ │ +
57 enum {
│ │ │ +
58 dimension = 2
│ │ │ +
59 };
│ │ │ +
60
│ │ │ +
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 const Cal3_S2& calibration() const { return *this; }
│ │ │ -
106
│ │ │ -
108 Matrix3 K() const override { return Cal3_S2::K(); }
│ │ │ -
109
│ │ │ -
111 inline double baseline() const { return b_; }
│ │ │ -
112
│ │ │ -
│ │ │ -
114 Vector6 vector() const {
│ │ │ -
115 Vector6 v;
│ │ │ -
116 v << Cal3_S2::vector(), b_;
│ │ │ -
117 return v;
│ │ │ -
118 }
│ │ │ +
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
│ │ │ -
123
│ │ │ -
125 inline size_t dim() const override { return Dim(); }
│ │ │ -
126
│ │ │ -
128 inline static size_t Dim() { return dimension; }
│ │ │ -
129
│ │ │ -
│ │ │ -
131 inline Cal3_S2Stereo retract(const Vector& d) const {
│ │ │ -
132 return Cal3_S2Stereo(fx() + d(0), fy() + d(1), skew() + d(2), px() + d(3),
│ │ │ -
133 py() + d(4), b_ + d(5));
│ │ │ -
134 }
│ │ │ -
│ │ │ -
135
│ │ │ -
│ │ │ -
137 Vector6 localCoordinates(const Cal3_S2Stereo& T2) const {
│ │ │ -
138 return T2.vector() - vector();
│ │ │ -
139 }
│ │ │ +
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;
│ │ │ +
139
│ │ │ +
│ │ │ +
141 friend Point3 operator*(double s, const Unit3& d) {
│ │ │ +
142 return Point3(s * d.p_);
│ │ │ +
143 }
│ │ │
│ │ │ -
140
│ │ │
144
│ │ │ -
145 private:
│ │ │ -
147 friend class boost::serialization::access;
│ │ │ -
148 template <class Archive>
│ │ │ -
149 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
150 ar& boost::serialization::make_nvp(
│ │ │ -
151 "Cal3_S2", boost::serialization::base_object<Cal3_S2>(*this));
│ │ │ -
152 ar& BOOST_SERIALIZATION_NVP(b_);
│ │ │ -
153 }
│ │ │ -
155};
│ │ │ -
│ │ │ -
156
│ │ │ -
157// Define GTSAM traits
│ │ │ -
158template <>
│ │ │ -
159struct traits<Cal3_S2Stereo> : public internal::Manifold<Cal3_S2Stereo> {};
│ │ │ +
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
│ │ │ -
161template <>
│ │ │ -
│ │ │ -
162struct traits<const Cal3_S2Stereo> : public internal::Manifold<Cal3_S2Stereo> {
│ │ │ -
163};
│ │ │ -
│ │ │ -
164
│ │ │ -
165} // \ namespace gtsam
│ │ │ -
The most common 5DOF 3D->2D calibration.
│ │ │ +
│ │ │ +
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
│ │ │ +
serialization for Vectors
│ │ │ +
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition types.h:308
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │ +
typedef and functions to augment Eigen's MatrixXd
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
2D Point
│ │ │ +
3D 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
│ │ │ +
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
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
The most common 5DOF 3D->2D calibration.
Definition Cal3_S2.h:34
│ │ │ -
The most common 5DOF 3D->2D calibration, stereo version.
Definition Cal3_S2Stereo.h:30
│ │ │ -
Vector6 vector() const
vectorized form (column-wise)
Definition Cal3_S2Stereo.h:114
│ │ │ -
Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b)
constructor from doubles
Definition Cal3_S2Stereo.h:47
│ │ │ -
Vector6 localCoordinates(const Cal3_S2Stereo &T2) const
Unretraction for the calibration.
Definition Cal3_S2Stereo.h:137
│ │ │ -
const Cal3_S2 & calibration() const
return calibration, same for left and right
Definition Cal3_S2Stereo.h:105
│ │ │ -
size_t dim() const override
return DOF, dimensionality of tangent space
Definition Cal3_S2Stereo.h:125
│ │ │ -
Vector3 calibrate(const Vector3 &p) const
Convert homogeneous image coordinates to intrinsic coordinates.
Definition Cal3_S2Stereo.h:85
│ │ │ -
Cal3_S2Stereo retract(const Vector &d) const
Given 6-dim tangent vector, create new calibration.
Definition Cal3_S2Stereo.h:131
│ │ │ -
Matrix3 K() const override
return calibration matrix K, same for left and right
Definition Cal3_S2Stereo.h:108
│ │ │ -
static size_t Dim()
return DOF, dimensionality of tangent space
Definition Cal3_S2Stereo.h:128
│ │ │ -
Cal3_S2Stereo(double fov, int w, int h, double b)
easy constructor; field-of-view in degrees, assumes zero skew
Definition Cal3_S2Stereo.h:55
│ │ │ -
double baseline() const
return baseline
Definition Cal3_S2Stereo.h:111
│ │ │ -
Cal3_S2Stereo(const Vector6 &d)
constructor from vector
Definition Cal3_S2Stereo.h:51
│ │ │ -
Cal3_S2Stereo()=default
default calibration leaves coordinates unchanged
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,204 +1,285 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3_S2Stereo.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_. │ │ │ │ +Unit3.h │ │ │ │ 1/* --------------------------------------------------------------------------- │ │ │ │ - │ │ │ │ 2 │ │ │ │ -3 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -4 * Atlanta, Georgia 30332-0415 │ │ │ │ -5 * All Rights Reserved │ │ │ │ +3 * Atlanta, Georgia 30332-0415 │ │ │ │ +4 * All Rights Reserved │ │ │ │ +5 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ 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_._h> │ │ │ │ -21#include │ │ │ │ +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 │ │ │ │ -23namespace _g_t_s_a_m { │ │ │ │ -24 │ │ │ │ -_3_0class GTSAM_EXPORT _C_a_l_3___S_2_S_t_e_r_e_o : public _C_a_l_3___S_2 { │ │ │ │ -31 private: │ │ │ │ -32 double b_ = 1.0f; │ │ │ │ -33 │ │ │ │ -34 public: │ │ │ │ -35 enum { dimension = 6 }; │ │ │ │ -36 │ │ │ │ -38 using shared_ptr = boost::shared_ptr; │ │ │ │ +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 │ │ │ │ -42 │ │ │ │ -_4_4 _C_a_l_3___S_2_S_t_e_r_e_o() = default; │ │ │ │ -45 │ │ │ │ -_4_7 _C_a_l_3___S_2_S_t_e_r_e_o(double fx, double fy, double s, double u0, double v0, double │ │ │ │ -b) │ │ │ │ -48 : _C_a_l_3___S_2(fx, fy, s, u0, v0), b_(b) {} │ │ │ │ -49 │ │ │ │ -_5_1 _C_a_l_3___S_2_S_t_e_r_e_o(const Vector6& d) │ │ │ │ -52 : _C_a_l_3___S_2(d(0), d(1), d(2), d(3), d(4)), b_(d(5)) {} │ │ │ │ -53 │ │ │ │ -_5_5 _C_a_l_3___S_2_S_t_e_r_e_o(double fov, int w, int h, double b) │ │ │ │ -56 : _C_a_l_3___S_2(fov, w, h), b_(b) {} │ │ │ │ -57 │ │ │ │ -59 │ │ │ │ -67 _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_,_ _6_> Dcal = boost:: │ │ │ │ -none, │ │ │ │ -68 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ -69 │ │ │ │ -77 _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_,_ _6_> Dcal = boost::none, │ │ │ │ -78 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ -79 │ │ │ │ -_8_5 Vector3 _c_a_l_i_b_r_a_t_e(const Vector3& p) const { return Cal3_S2::calibrate(p); } │ │ │ │ -86 │ │ │ │ -89 │ │ │ │ -91 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -92 const _C_a_l_3___S_2_S_t_e_r_e_o& cal); │ │ │ │ -93 │ │ │ │ -95 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ -96 │ │ │ │ -98 bool _e_q_u_a_l_s(const _C_a_l_3___S_2_S_t_e_r_e_o& other, double tol = 10e-9) const; │ │ │ │ -99 │ │ │ │ +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 │ │ │ │ +54 │ │ │ │ +55public: │ │ │ │ +56 │ │ │ │ +57 enum { │ │ │ │ +58 dimension = 2 │ │ │ │ +59 }; │ │ │ │ +60 │ │ │ │ +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 │ │ │ │ -_1_0_5 const _C_a_l_3___S_2& _c_a_l_i_b_r_a_t_i_o_n() const { return *this; } │ │ │ │ -106 │ │ │ │ -_1_0_8 Matrix3 _K() const override { return Cal3_S2::K(); } │ │ │ │ -109 │ │ │ │ -_1_1_1 inline double _b_a_s_e_l_i_n_e() const { return b_; } │ │ │ │ -112 │ │ │ │ -_1_1_4 Vector6 _v_e_c_t_o_r() const { │ │ │ │ -115 Vector6 v; │ │ │ │ -116 v << Cal3_S2::vector(), b_; │ │ │ │ -117 return v; │ │ │ │ -118 } │ │ │ │ +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 │ │ │ │ -123 │ │ │ │ -_1_2_5 inline size_t _d_i_m() const override { return Dim(); } │ │ │ │ -126 │ │ │ │ -_1_2_8 inline static size_t _D_i_m() { return dimension; } │ │ │ │ -129 │ │ │ │ -_1_3_1 inline _C_a_l_3___S_2_S_t_e_r_e_o _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ -132 return _C_a_l_3___S_2_S_t_e_r_e_o(fx() + d(0), fy() + d(1), skew() + d(2), px() + d(3), │ │ │ │ -133 py() + d(4), b_ + d(5)); │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -_1_3_7 Vector6 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3___S_2_S_t_e_r_e_o& T2) const { │ │ │ │ -138 return T2._v_e_c_t_o_r() - vector(); │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ +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; │ │ │ │ +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 │ │ │ │ -145 private: │ │ │ │ -_1_4_7 friend class boost::serialization::access; │ │ │ │ -148 template │ │ │ │ -149 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -150 ar& boost::serialization::make_nvp( │ │ │ │ -151 "Cal3_S2", boost::serialization::base_object(*this)); │ │ │ │ -152 ar& BOOST_SERIALIZATION_NVP(b_); │ │ │ │ -153 } │ │ │ │ -155}; │ │ │ │ -156 │ │ │ │ -157// Define GTSAM traits │ │ │ │ -158template <> │ │ │ │ -_1_5_9struct _t_r_a_i_t_s<_C_a_l_3___S_2_S_t_e_r_e_o> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +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 │ │ │ │ -161template <> │ │ │ │ -_1_6_2struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_: │ │ │ │ -_M_a_n_i_f_o_l_d { │ │ │ │ -163}; │ │ │ │ -164 │ │ │ │ -165} // \ namespace gtsam │ │ │ │ -_C_a_l_3___S_2_._h │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ +_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 │ │ │ │ +_V_e_c_t_o_r_S_e_r_i_a_l_i_z_a_t_i_o_n_._h │ │ │ │ +serialization for Vectors │ │ │ │ +_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_._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_2_._h │ │ │ │ +2D Point │ │ │ │ +_P_o_i_n_t_3_._h │ │ │ │ +3D 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_:_:_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_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_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_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_S_t_e_r_e_o_:_:_v_e_c_t_o_r │ │ │ │ -Vector6 vector() const │ │ │ │ -vectorized form (column-wise) │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:114 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ -Cal3_S2Stereo(double fx, double fy, double s, double u0, double v0, double b) │ │ │ │ -constructor from doubles │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:47 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector6 localCoordinates(const Cal3_S2Stereo &T2) const │ │ │ │ -Unretraction for the calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:137 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_c_a_l_i_b_r_a_t_i_o_n │ │ │ │ -const Cal3_S2 & calibration() const │ │ │ │ -return calibration, same for left and right │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:105 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_d_i_m │ │ │ │ -size_t dim() const override │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:125 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_c_a_l_i_b_r_a_t_e │ │ │ │ -Vector3 calibrate(const Vector3 &p) const │ │ │ │ -Convert homogeneous image coordinates to intrinsic coordinates. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:85 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_r_e_t_r_a_c_t │ │ │ │ -Cal3_S2Stereo retract(const Vector &d) const │ │ │ │ -Given 6-dim tangent vector, create new calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:131 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_K │ │ │ │ -Matrix3 K() const override │ │ │ │ -return calibration matrix K, same for left and right │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:108 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_D_i_m │ │ │ │ +_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 │ │ │ │ static size_t Dim() │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:128 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ -Cal3_S2Stereo(double fov, int w, int h, double b) │ │ │ │ -easy constructor; field-of-view in degrees, assumes zero skew │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:55 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_b_a_s_e_l_i_n_e │ │ │ │ -double baseline() const │ │ │ │ -return baseline │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:111 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ -Cal3_S2Stereo(const Vector6 &d) │ │ │ │ -constructor from vector │ │ │ │ -DDeeffiinniittiioonn Cal3_S2Stereo.h:51 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3___S_2_S_t_e_r_e_o_:_:_C_a_l_3___S_2_S_t_e_r_e_o │ │ │ │ -Cal3_S2Stereo()=default │ │ │ │ -default calibration leaves coordinates unchanged │ │ │ │ +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 │ │ │ │ * _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 │ │ │ │ + * UUnniitt33..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/a00434.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2Stereo.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3M.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,42 +94,41 @@ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Cal3_S2Stereo.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
Rot3M.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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 Cal3_S2Stereo &cal)
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Chris Beall
│ │ │ +

Rotation (internal: 3*3 matrix representation*)

│ │ │ +
Author
Alireza Fathi
│ │ │ +
│ │ │ +Christian Potthast
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +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 │ │ │ │ -Cal3_S2Stereo.cpp File Reference │ │ │ │ -The most common 5DOF 3D->2D calibration + Stereo baseline. _M_o_r_e_._._. │ │ │ │ +_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. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3___S_2_S_t_e_r_e_o &cal) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The most common 5DOF 3D->2D calibration + Stereo baseline. │ │ │ │ +Rotation (internal: 3*3 matrix representation*) │ │ │ │ Author │ │ │ │ - Chris Beall │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ + Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _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_._c_p_p │ │ │ │ + * _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/a00440.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3_S2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoCamera.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,42 +94,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Cal3_S2.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
StereoCamera.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

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

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

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::StereoCheiralityException
 
class  gtsam::StereoCamera
 A stereo camera class, parameterize by left camera pose and stereo calibration. More...
 
struct  gtsam::traits< StereoCamera >
 
struct  gtsam::traits< const StereoCamera >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

│ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Cal3_S2 &cal)
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ -
Author
Frank Dellaert
│ │ │ +

A Stereo Camera based on two Simple Cameras.

│ │ │ +

A Rectified Stereo Camera.

│ │ │ +
Author
Chris Beall
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ -Cal3_S2.cpp File Reference │ │ │ │ -The most common 5DOF 3D->2D calibration. _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_:_:_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_:_:_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_<_ _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_ _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. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3___S_2 &cal) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -The most common 5DOF 3D->2D calibration. │ │ │ │ +A Stereo Camera based on two Simple Cameras. │ │ │ │ +A Rectified Stereo Camera. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Chris Beall │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3___S_2_._c_p_p │ │ │ │ + * _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/a00443.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Unified.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Fisheye.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,49 +96,49 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Cal3Unified.h File Reference
│ │ │ +
Cal3Fisheye.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Unified Calibration Model, see Mei07icra for details. │ │ │ +

Calibration of a fisheye camera. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::Cal3Unified
 Calibration of a omni-directional camera with mirror + lens radial distortion. More...
class  gtsam::Cal3Fisheye
 Calibration of a fisheye camera. More...
 
struct  gtsam::traits< Cal3Unified >
struct  gtsam::traits< Cal3Fisheye >
 
struct  gtsam::traits< const Cal3Unified >
struct  gtsam::traits< const Cal3Fisheye >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Unified Calibration Model, see Mei07icra for details.

│ │ │ -
Date
Mar 8, 2014
│ │ │ -
Author
Jing Dong
│ │ │ +

Calibration of a fisheye camera.

│ │ │ +
Date
Apr 8, 2020
│ │ │ +
Author
ghaggin
│ │ │
│ │ │ Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +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 │ │ │ │ -Cal3Unified.h File Reference │ │ │ │ -Unified Calibration Model, see Mei07icra for details. _M_o_r_e_._._. │ │ │ │ +Cal3Fisheye.h File Reference │ │ │ │ +Calibration of a fisheye camera. _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_U_n_i_f_i_e_d │ │ │ │ -  Calibration of a omni-directional camera with mirror + lens radial │ │ │ │ - distortion. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e │ │ │ │ +  Calibration of a fisheye camera. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_U_n_i_f_i_e_d_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_F_i_s_h_e_y_e_ _> │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _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_ _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 ********** │ │ │ │ -Unified Calibration Model, see Mei07icra for details. │ │ │ │ +Calibration of a fisheye camera. │ │ │ │ Date │ │ │ │ - Mar 8, 2014 │ │ │ │ + Apr 8, 2020 │ │ │ │ Author │ │ │ │ - Jing Dong │ │ │ │ + ghaggin │ │ │ │ Varun Agrawal │ │ │ │ * _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 │ │ │ │ + * _C_a_l_3_F_i_s_h_e_y_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/a00443.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00443 = [ │ │ │ │ - ["gtsam::traits< Cal3Unified >", "a03012.html", null], │ │ │ │ - ["gtsam::traits< const Cal3Unified >", "a03016.html", null] │ │ │ │ + ["gtsam::traits< Cal3Fisheye >", "a03000.html", null], │ │ │ │ + ["gtsam::traits< const Cal3Fisheye >", "a03004.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00443_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Unified.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Fisheye.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,127 +98,177 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3Unified.h
│ │ │ +
Cal3Fisheye.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/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
│ │ │ -
56 using shared_ptr = boost::shared_ptr<Cal3Unified>;
│ │ │ -
57
│ │ │ -
60
│ │ │ -
62 Cal3Unified() = default;
│ │ │ -
63
│ │ │ -
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) {}
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/geometry/Cal3.h>
│ │ │ + │ │ │ +
24
│ │ │ +
25#include <boost/shared_ptr.hpp>
│ │ │ +
26
│ │ │ +
27#include <string>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │ +
30
│ │ │ +
│ │ │ +
51class GTSAM_EXPORT Cal3Fisheye : public Cal3 {
│ │ │ +
52 private:
│ │ │ +
53 double k1_ = 0.0f, k2_ = 0.0f;
│ │ │ +
54 double k3_ = 0.0f, k4_ = 0.0f;
│ │ │ +
55 double tol_ = 1e-5;
│ │ │ +
56
│ │ │ +
57 public:
│ │ │ +
58 enum { dimension = 9 };
│ │ │ +
60 using shared_ptr = boost::shared_ptr<Cal3Fisheye>;
│ │ │ +
61
│ │ │ +
64
│ │ │ +
66 Cal3Fisheye() = default;
│ │ │
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;
│ │ │ +
68 Cal3Fisheye(const double fx, const double fy, const double s, const double u0,
│ │ │ +
69 const double v0, const double k1, const double k2,
│ │ │ +
70 const double k3, const double k4, double tol = 1e-5)
│ │ │ +
71 : Cal3(fx, fy, s, u0, v0),
│ │ │ +
72 k1_(k1),
│ │ │ +
73 k2_(k2),
│ │ │ +
74 k3_(k3),
│ │ │ +
75 k4_(k4),
│ │ │ +
76 tol_(tol) {}
│ │ │ +
77
│ │ │ +
78 ~Cal3Fisheye() override {}
│ │ │ +
79
│ │ │ +
83
│ │ │ +
84 explicit Cal3Fisheye(const Vector9& v)
│ │ │ +
85 : Cal3(v(0), v(1), v(2), v(3), v(4)),
│ │ │ +
86 k1_(v(5)),
│ │ │ +
87 k2_(v(6)),
│ │ │ +
88 k3_(v(7)),
│ │ │ +
89 k4_(v(8)) {}
│ │ │
90
│ │ │
94
│ │ │ -
96 inline double xi() const { return xi_; }
│ │ │ +
96 inline double k1() const { return k1_; }
│ │ │
97
│ │ │ -
99 Vector10 vector() const;
│ │ │ +
99 inline double k2() const { return k2_; }
│ │ │
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;
│ │ │ +
102 inline double k3() const { return k3_; }
│ │ │ +
103
│ │ │ +
105 inline double k4() const { return k4_; }
│ │ │ +
106
│ │ │ +
108 Vector4 k() const { return Vector4(k1_, k2_, k3_, k4_); }
│ │ │ +
109
│ │ │ +
111 Vector9 vector() const;
│ │ │ +
112
│ │ │ +
114 static double Scaling(double r);
│ │ │
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; }
│ │ │ +
124 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
│ │ │ +
125 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ +
126
│ │ │ +
135 Point2 calibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
│ │ │ +
136 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │
137
│ │ │ -
139
│ │ │ -
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}
│ │ │ +
141
│ │ │ +
143 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ +
144 const Cal3Fisheye& cal);
│ │ │ +
145
│ │ │ +
147 void print(const std::string& s = "") const override;
│ │ │ +
148
│ │ │ +
150 bool equals(const Cal3Fisheye& K, double tol = 10e-9) const;
│ │ │ +
151
│ │ │ +
155
│ │ │ +
157 size_t dim() const override { return Dim(); }
│ │ │ +
158
│ │ │ +
160 inline static size_t Dim() { return dimension; }
│ │ │ +
161
│ │ │ +
│ │ │ +
163 inline Cal3Fisheye retract(const Vector& d) const {
│ │ │ +
164 return Cal3Fisheye(vector() + d);
│ │ │ +
165 }
│ │ │ +
│ │ │ +
166
│ │ │ +
│ │ │ +
168 Vector localCoordinates(const Cal3Fisheye& T2) const {
│ │ │ +
169 return T2.vector() - vector();
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
175
│ │ │ +
│ │ │ +
177 virtual boost::shared_ptr<Cal3Fisheye> clone() const {
│ │ │ +
178 return boost::shared_ptr<Cal3Fisheye>(new Cal3Fisheye(*this));
│ │ │ +
179 }
│ │ │ +
│ │ │ +
180
│ │ │ +
182
│ │ │ +
183 private:
│ │ │ +
186
│ │ │ +
188 friend class boost::serialization::access;
│ │ │ +
189 template <class Archive>
│ │ │ +
190 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ +
191 ar& boost::serialization::make_nvp(
│ │ │ +
192 "Cal3Fisheye", boost::serialization::base_object<Cal3>(*this));
│ │ │ +
193 ar& BOOST_SERIALIZATION_NVP(k1_);
│ │ │ +
194 ar& BOOST_SERIALIZATION_NVP(k2_);
│ │ │ +
195 ar& BOOST_SERIALIZATION_NVP(k3_);
│ │ │ +
196 ar& BOOST_SERIALIZATION_NVP(k4_);
│ │ │ +
197 }
│ │ │ +
198
│ │ │ +
200};
│ │ │ +
│ │ │ +
201
│ │ │ +
202template <>
│ │ │ +
203struct traits<Cal3Fisheye> : public internal::Manifold<Cal3Fisheye> {};
│ │ │ +
204
│ │ │ +
205template <>
│ │ │ +
206struct traits<const Cal3Fisheye> : public internal::Manifold<Cal3Fisheye> {};
│ │ │ +
207
│ │ │ +
208} // namespace gtsam
│ │ │ +
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
│ │ │
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
│ │ │
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
│ │ │ -
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
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
Common base class for all calibration models.
Definition Cal3.h:69
│ │ │ +
Calibration of a fisheye camera.
Definition Cal3Fisheye.h:51
│ │ │ +
double k4() const
Second tangential distortion coefficient.
Definition Cal3Fisheye.h:105
│ │ │ +
double k1() const
First distortion coefficient.
Definition Cal3Fisheye.h:96
│ │ │ +
double k3() const
First tangential distortion coefficient.
Definition Cal3Fisheye.h:102
│ │ │ +
Vector localCoordinates(const Cal3Fisheye &T2) const
Given a different calibration, calculate update to obtain it.
Definition Cal3Fisheye.h:168
│ │ │ +
static size_t Dim()
Return dimensions of calibration manifold object.
Definition Cal3Fisheye.h:160
│ │ │ +
double k2() const
Second distortion coefficient.
Definition Cal3Fisheye.h:99
│ │ │ +
size_t dim() const override
Return dimensions of calibration manifold object.
Definition Cal3Fisheye.h:157
│ │ │ +
Vector9 vector() const
Return all parameters as a vector.
Definition Cal3Fisheye.cpp:28
│ │ │ +
virtual boost::shared_ptr< Cal3Fisheye > clone() const
Definition Cal3Fisheye.h:177
│ │ │ +
Vector4 k() const
return distortion parameter vector
Definition Cal3Fisheye.h:108
│ │ │ +
Cal3Fisheye()=default
Default Constructor with only unit focal length.
│ │ │ +
Cal3Fisheye retract(const Vector &d) const
Given delta vector, update calibration.
Definition Cal3Fisheye.h:163
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,110 +1,149 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3Unified.h │ │ │ │ +Cal3Fisheye.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 │ │ │ │ -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 │ │ │ │ -56 using shared_ptr = boost::shared_ptr; │ │ │ │ -57 │ │ │ │ -60 │ │ │ │ -_6_2 _C_a_l_3_U_n_i_f_i_e_d() = default; │ │ │ │ -63 │ │ │ │ -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) {} │ │ │ │ +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 │ │ │ │ +25#include │ │ │ │ +26 │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ +30 │ │ │ │ +_5_1class GTSAM_EXPORT _C_a_l_3_F_i_s_h_e_y_e : public _C_a_l_3 { │ │ │ │ +52 private: │ │ │ │ +53 double k1_ = 0.0f, k2_ = 0.0f; │ │ │ │ +54 double k3_ = 0.0f, k4_ = 0.0f; │ │ │ │ +55 double tol_ = 1e-5; │ │ │ │ +56 │ │ │ │ +57 public: │ │ │ │ +58 enum { dimension = 9 }; │ │ │ │ +60 using shared_ptr = boost::shared_ptr; │ │ │ │ +61 │ │ │ │ +64 │ │ │ │ +_6_6 _C_a_l_3_F_i_s_h_e_y_e() = default; │ │ │ │ 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; │ │ │ │ +68 _C_a_l_3_F_i_s_h_e_y_e(const double fx, const double fy, const double s, const double │ │ │ │ +u0, │ │ │ │ +69 const double v0, const double k1, const double k2, │ │ │ │ +70 const double k3, const double k4, double tol = 1e-5) │ │ │ │ +71 : _C_a_l_3(fx, fy, s, u0, v0), │ │ │ │ +72 k1_(k1), │ │ │ │ +73 k2_(k2), │ │ │ │ +74 k3_(k3), │ │ │ │ +75 k4_(k4), │ │ │ │ +76 tol_(tol) {} │ │ │ │ +77 │ │ │ │ +78 _~_C_a_l_3_F_i_s_h_e_y_e() override {} │ │ │ │ +79 │ │ │ │ +83 │ │ │ │ +84 explicit Cal3Fisheye(const Vector9& v) │ │ │ │ +85 : Cal3(v(0), v(1), v(2), v(3), v(4)), │ │ │ │ +86 k1_(v(5)), │ │ │ │ +87 k2_(v(6)), │ │ │ │ +88 k3_(v(7)), │ │ │ │ +89 k4_(v(8)) {} │ │ │ │ 90 │ │ │ │ 94 │ │ │ │ -_9_6 inline double _x_i() const { return xi_; } │ │ │ │ +_9_6 inline double _k_1() const { return k1_; } │ │ │ │ 97 │ │ │ │ -99 Vector10 vector() const; │ │ │ │ +_9_9 inline double _k_2() const { return k2_; } │ │ │ │ 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; │ │ │ │ +_1_0_2 inline double _k_3() const { return k3_; } │ │ │ │ +103 │ │ │ │ +_1_0_5 inline double _k_4() const { return k4_; } │ │ │ │ +106 │ │ │ │ +_1_0_8 Vector4 _k() const { return Vector4(k1_, k2_, k3_, k4_); } │ │ │ │ +109 │ │ │ │ +111 Vector9 vector() const; │ │ │ │ +112 │ │ │ │ +114 static double Scaling(double r); │ │ │ │ 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; } │ │ │ │ +124 _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, │ │ │ │ +125 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ +126 │ │ │ │ +135 _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, │ │ │ │ +136 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ 137 │ │ │ │ -139 │ │ │ │ -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 │ │ │ │ +141 │ │ │ │ +143 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ +144 const _C_a_l_3_F_i_s_h_e_y_e& cal); │ │ │ │ +145 │ │ │ │ +147 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ +148 │ │ │ │ +150 bool _e_q_u_a_l_s(const _C_a_l_3_F_i_s_h_e_y_e& K, double tol = 10e-9) const; │ │ │ │ +151 │ │ │ │ +155 │ │ │ │ +_1_5_7 size_t _d_i_m() const override { return Dim(); } │ │ │ │ +158 │ │ │ │ +_1_6_0 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +161 │ │ │ │ +_1_6_3 inline _C_a_l_3_F_i_s_h_e_y_e _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ +164 return _C_a_l_3_F_i_s_h_e_y_e(vector() + d); │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +_1_6_8 Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3_F_i_s_h_e_y_e& T2) const { │ │ │ │ +169 return T2._v_e_c_t_o_r() - vector(); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +175 │ │ │ │ +_1_7_7 virtual boost::shared_ptr _c_l_o_n_e() const { │ │ │ │ +178 return boost::shared_ptr(new _C_a_l_3_F_i_s_h_e_y_e(*this)); │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +182 │ │ │ │ +183 private: │ │ │ │ +186 │ │ │ │ +_1_8_8 friend class boost::serialization::access; │ │ │ │ +189 template │ │ │ │ +190 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ +191 ar& boost::serialization::make_nvp( │ │ │ │ +192 "Cal3Fisheye", boost::serialization::base_object(*this)); │ │ │ │ +193 ar& BOOST_SERIALIZATION_NVP(k1_); │ │ │ │ +194 ar& BOOST_SERIALIZATION_NVP(k2_); │ │ │ │ +195 ar& BOOST_SERIALIZATION_NVP(k3_); │ │ │ │ +196 ar& BOOST_SERIALIZATION_NVP(k4_); │ │ │ │ +197 } │ │ │ │ +198 │ │ │ │ +200}; │ │ │ │ +201 │ │ │ │ +202template <> │ │ │ │ +_2_0_3struct _t_r_a_i_t_s<_C_a_l_3_F_i_s_h_e_y_e> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ +204 │ │ │ │ +205template <> │ │ │ │ +_2_0_6struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ {}; │ │ │ │ -156} │ │ │ │ +207 │ │ │ │ +208} // namespace gtsam │ │ │ │ +_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 │ │ │ │ @@ -120,32 +159,66 @@ │ │ │ │ _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_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 │ │ │ │ +_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_:_:_C_a_l_3 │ │ │ │ +Common base class for all calibration models. │ │ │ │ +DDeeffiinniittiioonn Cal3.h:69 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e │ │ │ │ +Calibration of a fisheye camera. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:51 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_4 │ │ │ │ +double k4() const │ │ │ │ +Second tangential distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:105 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_1 │ │ │ │ +double k1() const │ │ │ │ +First distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:96 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_3 │ │ │ │ +double k3() const │ │ │ │ +First tangential distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:102 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ +Vector localCoordinates(const Cal3Fisheye &T2) const │ │ │ │ +Given a different calibration, calculate update to obtain it. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:168 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_D_i_m │ │ │ │ +static size_t Dim() │ │ │ │ +Return dimensions of calibration manifold object. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:160 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_2 │ │ │ │ +double k2() const │ │ │ │ +Second distortion coefficient. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:99 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_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 │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:157 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_v_e_c_t_o_r │ │ │ │ +Vector9 vector() const │ │ │ │ +Return all parameters as a vector. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.cpp:28 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_c_l_o_n_e │ │ │ │ +virtual boost::shared_ptr< Cal3Fisheye > clone() const │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:177 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k │ │ │ │ +Vector4 k() const │ │ │ │ +return distortion parameter vector │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:108 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_C_a_l_3_F_i_s_h_e_y_e │ │ │ │ +Cal3Fisheye()=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() │ │ │ │ -Return dimensions of calibration manifold object. │ │ │ │ -DDeeffiinniittiioonn Cal3Unified.h:136 │ │ │ │ +_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_r_e_t_r_a_c_t │ │ │ │ +Cal3Fisheye retract(const Vector &d) const │ │ │ │ +Given delta vector, update calibration. │ │ │ │ +DDeeffiinniittiioonn Cal3Fisheye.h:163 │ │ │ │ * _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 │ │ │ │ + * _C_a_l_3_F_i_s_h_e_y_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/a00446.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Unified.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/StereoPoint2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
Cal3Unified.cpp File Reference
│ │ │ +Typedefs
│ │ │ +
StereoPoint2.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

A 2D stereo point (uL,uR,v) │ │ │ +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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ -Functions

│ │ │ -std::ostream & gtsam::operator<< (std::ostream &os, const Cal3Unified &cal)
 

│ │ │ +Typedefs

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

Detailed Description

│ │ │ -
Date
Mar 8, 2014
│ │ │ -
Author
Jing Dong
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ +

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

│ │ │ +
Date
Jan 26, 2010
│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,34 @@ │ │ │ │ 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 │ │ │ │ -Cal3Unified.cpp 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 │ │ │ │ +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_:_:_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_ _> │ │ │ │ +  │ │ │ │ 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_U_n_i_f_i_e_d &cal) │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef std::vector< _S_t_e_r_e_o_P_o_i_n_t_2 >  ggttssaamm::::SStteerreeooPPooiinntt22VVeeccttoorr │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +A 2D stereo point (uL,uR,v) │ │ │ │ Date │ │ │ │ - Mar 8, 2014 │ │ │ │ + Jan 26, 2010 │ │ │ │ Author │ │ │ │ - Jing Dong │ │ │ │ - Varun Agrawal │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_U_n_i_f_i_e_d_._c_p_p │ │ │ │ + * _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/a00449.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Fisheye.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,50 +95,98 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
Cal3Fisheye.h File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
Point3.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Calibration of a fisheye camera. │ │ │ +

3D Point │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::Cal3Fisheye
 Calibration of a fisheye camera. More...
 
struct  gtsam::traits< Cal3Fisheye >
 
struct  gtsam::traits< const Cal3Fisheye >
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.
 
│ │ │

Detailed Description

│ │ │ -

Calibration of a fisheye camera.

│ │ │ -
Date
Apr 8, 2020
│ │ │ -
Author
ghaggin
│ │ │ +

3D Point

│ │ │ +
Author
Alireza Fathi
│ │ │ +
│ │ │ +Christian Potthast
│ │ │
│ │ │ -Varun Agrawal
│ │ │ +Frank Dellaert
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 │ │ │ │ -Cal3Fisheye.h File Reference │ │ │ │ -Calibration of a fisheye camera. _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_:_:_C_a_l_3_F_i_s_h_e_y_e │ │ │ │ -  Calibration of a fisheye camera. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _C_a_l_3_F_i_s_h_e_y_e_ _> │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _c_o_n_s_t_ _C_a_l_3_F_i_s_h_e_y_e_ _> │ │ │ │ +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 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 ********** │ │ │ │ -Calibration of a fisheye camera. │ │ │ │ - Date │ │ │ │ - Apr 8, 2020 │ │ │ │ +3D Point │ │ │ │ Author │ │ │ │ - ghaggin │ │ │ │ - Varun Agrawal │ │ │ │ + Alireza Fathi │ │ │ │ + Christian Potthast │ │ │ │ + Frank Dellaert │ │ │ │ * _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 │ │ │ │ + * _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/a00449.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,11 @@ │ │ │ │ var a00449 = [ │ │ │ │ - ["gtsam::traits< Cal3Fisheye >", "a03000.html", null], │ │ │ │ - ["gtsam::traits< const Cal3Fisheye >", "a03004.html", null] │ │ │ │ + ["gtsam::Range< Point3, Point3 >", "a03152.html", null], │ │ │ │ + ["Point3", "a00449.html#aaa8ed89fd60ea4601d9de63c4811525b", null], │ │ │ │ + ["cross", "a00449.html#a86bf6ed2ffb0ecc42a7deb8922f4ca4f", null], │ │ │ │ + ["distance3", "a00449.html#aa42f7ec660b7353de39f9c86a26711cc", null], │ │ │ │ + ["dot", "a00449.html#a7dc820e4e47218768f104b43a184a1bd", null], │ │ │ │ + ["mean", "a00449.html#a300205092710091b8745c0a145da20a1", null], │ │ │ │ + ["means", "a00449.html#a57f778b84bc6106471006421d289b832", null], │ │ │ │ + ["norm3", "a00449.html#ac37b6f807985ffd25217e33f6136fe58", null], │ │ │ │ + ["normalize", "a00449.html#abb52bb00c68909fc1147e5d112e8c2ae", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00449_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Fisheye.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Point3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,177 +98,113 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3Fisheye.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
│ │ │ -
20#pragma once
│ │ │ +
20// \callgraph
│ │ │
21
│ │ │ -
22#include <gtsam/geometry/Cal3.h>
│ │ │ - │ │ │ -
24
│ │ │ -
25#include <boost/shared_ptr.hpp>
│ │ │ -
26
│ │ │ -
27#include <string>
│ │ │ -
28
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
│ │ │ -
51class GTSAM_EXPORT Cal3Fisheye : public Cal3 {
│ │ │ -
52 private:
│ │ │ -
53 double k1_ = 0.0f, k2_ = 0.0f;
│ │ │ -
54 double k3_ = 0.0f, k4_ = 0.0f;
│ │ │ -
55 double tol_ = 1e-5;
│ │ │ -
56
│ │ │ -
57 public:
│ │ │ -
58 enum { dimension = 9 };
│ │ │ -
60 using shared_ptr = boost::shared_ptr<Cal3Fisheye>;
│ │ │ -
61
│ │ │ -
64
│ │ │ -
66 Cal3Fisheye() = default;
│ │ │ -
67
│ │ │ -
68 Cal3Fisheye(const double fx, const double fy, const double s, const double u0,
│ │ │ -
69 const double v0, const double k1, const double k2,
│ │ │ -
70 const double k3, const double k4, double tol = 1e-5)
│ │ │ -
71 : Cal3(fx, fy, s, u0, v0),
│ │ │ -
72 k1_(k1),
│ │ │ -
73 k2_(k2),
│ │ │ -
74 k3_(k3),
│ │ │ -
75 k4_(k4),
│ │ │ -
76 tol_(tol) {}
│ │ │ -
77
│ │ │ -
78 ~Cal3Fisheye() override {}
│ │ │ -
79
│ │ │ -
83
│ │ │ -
84 explicit Cal3Fisheye(const Vector9& v)
│ │ │ -
85 : Cal3(v(0), v(1), v(2), v(3), v(4)),
│ │ │ -
86 k1_(v(5)),
│ │ │ -
87 k2_(v(6)),
│ │ │ -
88 k3_(v(7)),
│ │ │ -
89 k4_(v(8)) {}
│ │ │ -
90
│ │ │ -
94
│ │ │ -
96 inline double k1() const { return k1_; }
│ │ │ -
97
│ │ │ -
99 inline double k2() const { return k2_; }
│ │ │ -
100
│ │ │ -
102 inline double k3() const { return k3_; }
│ │ │ -
103
│ │ │ -
105 inline double k4() const { return k4_; }
│ │ │ -
106
│ │ │ -
108 Vector4 k() const { return Vector4(k1_, k2_, k3_, k4_); }
│ │ │ -
109
│ │ │ -
111 Vector9 vector() const;
│ │ │ -
112
│ │ │ -
114 static double Scaling(double r);
│ │ │ -
115
│ │ │ -
124 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
│ │ │ -
125 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
126
│ │ │ -
135 Point2 calibrate(const Point2& p, OptionalJacobian<2, 9> Dcal = boost::none,
│ │ │ -
136 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
137
│ │ │ -
141
│ │ │ -
143 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
144 const Cal3Fisheye& cal);
│ │ │ -
145
│ │ │ -
147 void print(const std::string& s = "") const override;
│ │ │ -
148
│ │ │ -
150 bool equals(const Cal3Fisheye& K, double tol = 10e-9) const;
│ │ │ -
151
│ │ │ -
155
│ │ │ -
157 size_t dim() const override { return Dim(); }
│ │ │ -
158
│ │ │ -
160 inline static size_t Dim() { return dimension; }
│ │ │ -
161
│ │ │ -
│ │ │ -
163 inline Cal3Fisheye retract(const Vector& d) const {
│ │ │ -
164 return Cal3Fisheye(vector() + d);
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ -
168 Vector localCoordinates(const Cal3Fisheye& T2) const {
│ │ │ -
169 return T2.vector() - vector();
│ │ │ -
170 }
│ │ │ +
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
│ │ │ +
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}
│ │ │
│ │ │ -
171
│ │ │ -
175
│ │ │ -
│ │ │ -
177 virtual boost::shared_ptr<Cal3Fisheye> clone() const {
│ │ │ -
178 return boost::shared_ptr<Cal3Fisheye>(new Cal3Fisheye(*this));
│ │ │ -
179 }
│ │ │ -
│ │ │ -
180
│ │ │ -
182
│ │ │ -
183 private:
│ │ │ -
186
│ │ │ -
188 friend class boost::serialization::access;
│ │ │ -
189 template <class Archive>
│ │ │ -
190 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
191 ar& boost::serialization::make_nvp(
│ │ │ -
192 "Cal3Fisheye", boost::serialization::base_object<Cal3>(*this));
│ │ │ -
193 ar& BOOST_SERIALIZATION_NVP(k1_);
│ │ │ -
194 ar& BOOST_SERIALIZATION_NVP(k2_);
│ │ │ -
195 ar& BOOST_SERIALIZATION_NVP(k3_);
│ │ │ -
196 ar& BOOST_SERIALIZATION_NVP(k4_);
│ │ │ -
197 }
│ │ │ -
198
│ │ │ -
200};
│ │ │ +
74
│ │ │ +
76GTSAM_EXPORT Point3Pair means(const std::vector<Point3Pair> &abPointPairs);
│ │ │ +
77
│ │ │ +
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};
│ │ │
│ │ │ -
201
│ │ │ -
202template <>
│ │ │ -
203struct traits<Cal3Fisheye> : public internal::Manifold<Cal3Fisheye> {};
│ │ │ -
204
│ │ │ -
205template <>
│ │ │ -
206struct traits<const Cal3Fisheye> : public internal::Manifold<Cal3Fisheye> {};
│ │ │ -
207
│ │ │ -
208} // namespace gtsam
│ │ │ -
2D Point
│ │ │ -
Common code for all Calibration models.
│ │ │ +
90
│ │ │ +
91} // namespace gtsam
│ │ │ +
92
│ │ │ +
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
│ │ │ -
Both ManifoldTraits and Testable.
Definition Manifold.h:120
│ │ │ +
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
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
Common base class for all calibration models.
Definition Cal3.h:69
│ │ │ -
Calibration of a fisheye camera.
Definition Cal3Fisheye.h:51
│ │ │ -
double k4() const
Second tangential distortion coefficient.
Definition Cal3Fisheye.h:105
│ │ │ -
double k1() const
First distortion coefficient.
Definition Cal3Fisheye.h:96
│ │ │ -
double k3() const
First tangential distortion coefficient.
Definition Cal3Fisheye.h:102
│ │ │ -
Vector localCoordinates(const Cal3Fisheye &T2) const
Given a different calibration, calculate update to obtain it.
Definition Cal3Fisheye.h:168
│ │ │ -
static size_t Dim()
Return dimensions of calibration manifold object.
Definition Cal3Fisheye.h:160
│ │ │ -
double k2() const
Second distortion coefficient.
Definition Cal3Fisheye.h:99
│ │ │ -
size_t dim() const override
Return dimensions of calibration manifold object.
Definition Cal3Fisheye.h:157
│ │ │ -
Vector9 vector() const
Return all parameters as a vector.
Definition Cal3Fisheye.cpp:28
│ │ │ -
virtual boost::shared_ptr< Cal3Fisheye > clone() const
Definition Cal3Fisheye.h:177
│ │ │ -
Vector4 k() const
return distortion parameter vector
Definition Cal3Fisheye.h:108
│ │ │ -
Cal3Fisheye()=default
Default Constructor with only unit focal length.
│ │ │ -
Cal3Fisheye retract(const Vector &d) const
Given delta vector, update calibration.
Definition Cal3Fisheye.h:163
│ │ │ +
Definition BearingRange.h:40
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,224 +1,140 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3Fisheye.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 │ │ │ │ -20#pragma once │ │ │ │ +20// \callgraph │ │ │ │ 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 │ │ │ │ -25#include │ │ │ │ -26 │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -_5_1class GTSAM_EXPORT _C_a_l_3_F_i_s_h_e_y_e : public _C_a_l_3 { │ │ │ │ -52 private: │ │ │ │ -53 double k1_ = 0.0f, k2_ = 0.0f; │ │ │ │ -54 double k3_ = 0.0f, k4_ = 0.0f; │ │ │ │ -55 double tol_ = 1e-5; │ │ │ │ -56 │ │ │ │ -57 public: │ │ │ │ -58 enum { dimension = 9 }; │ │ │ │ -60 using shared_ptr = boost::shared_ptr; │ │ │ │ -61 │ │ │ │ -64 │ │ │ │ -_6_6 _C_a_l_3_F_i_s_h_e_y_e() = default; │ │ │ │ -67 │ │ │ │ -68 _C_a_l_3_F_i_s_h_e_y_e(const double fx, const double fy, const double s, const double │ │ │ │ -u0, │ │ │ │ -69 const double v0, const double k1, const double k2, │ │ │ │ -70 const double k3, const double k4, double tol = 1e-5) │ │ │ │ -71 : _C_a_l_3(fx, fy, s, u0, v0), │ │ │ │ -72 k1_(k1), │ │ │ │ -73 k2_(k2), │ │ │ │ -74 k3_(k3), │ │ │ │ -75 k4_(k4), │ │ │ │ -76 tol_(tol) {} │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ -78 _~_C_a_l_3_F_i_s_h_e_y_e() override {} │ │ │ │ -79 │ │ │ │ -83 │ │ │ │ -84 explicit Cal3Fisheye(const Vector9& v) │ │ │ │ -85 : Cal3(v(0), v(1), v(2), v(3), v(4)), │ │ │ │ -86 k1_(v(5)), │ │ │ │ -87 k2_(v(6)), │ │ │ │ -88 k3_(v(7)), │ │ │ │ -89 k4_(v(8)) {} │ │ │ │ +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 │ │ │ │ -94 │ │ │ │ -_9_6 inline double _k_1() const { return k1_; } │ │ │ │ -97 │ │ │ │ -_9_9 inline double _k_2() const { return k2_; } │ │ │ │ -100 │ │ │ │ -_1_0_2 inline double _k_3() const { return k3_; } │ │ │ │ -103 │ │ │ │ -_1_0_5 inline double _k_4() const { return k4_; } │ │ │ │ -106 │ │ │ │ -_1_0_8 Vector4 _k() const { return Vector4(k1_, k2_, k3_, k4_); } │ │ │ │ -109 │ │ │ │ -111 Vector9 vector() const; │ │ │ │ -112 │ │ │ │ -114 static double Scaling(double r); │ │ │ │ -115 │ │ │ │ -124 _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, │ │ │ │ -125 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ -126 │ │ │ │ -135 _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, │ │ │ │ -136 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) const; │ │ │ │ -137 │ │ │ │ -141 │ │ │ │ -143 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -144 const _C_a_l_3_F_i_s_h_e_y_e& cal); │ │ │ │ -145 │ │ │ │ -147 void _p_r_i_n_t(const std::string& s = "") const override; │ │ │ │ -148 │ │ │ │ -150 bool _e_q_u_a_l_s(const _C_a_l_3_F_i_s_h_e_y_e& K, double tol = 10e-9) const; │ │ │ │ -151 │ │ │ │ -155 │ │ │ │ -_1_5_7 size_t _d_i_m() const override { return Dim(); } │ │ │ │ -158 │ │ │ │ -_1_6_0 inline static size_t _D_i_m() { return dimension; } │ │ │ │ -161 │ │ │ │ -_1_6_3 inline _C_a_l_3_F_i_s_h_e_y_e _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ -164 return _C_a_l_3_F_i_s_h_e_y_e(vector() + d); │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_6_8 Vector _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3_F_i_s_h_e_y_e& T2) const { │ │ │ │ -169 return T2._v_e_c_t_o_r() - vector(); │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -175 │ │ │ │ -_1_7_7 virtual boost::shared_ptr _c_l_o_n_e() const { │ │ │ │ -178 return boost::shared_ptr(new _C_a_l_3_F_i_s_h_e_y_e(*this)); │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -182 │ │ │ │ -183 private: │ │ │ │ -186 │ │ │ │ -_1_8_8 friend class boost::serialization::access; │ │ │ │ -189 template │ │ │ │ -190 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -191 ar& boost::serialization::make_nvp( │ │ │ │ -192 "Cal3Fisheye", boost::serialization::base_object(*this)); │ │ │ │ -193 ar& BOOST_SERIALIZATION_NVP(k1_); │ │ │ │ -194 ar& BOOST_SERIALIZATION_NVP(k2_); │ │ │ │ -195 ar& BOOST_SERIALIZATION_NVP(k3_); │ │ │ │ -196 ar& BOOST_SERIALIZATION_NVP(k4_); │ │ │ │ -197 } │ │ │ │ -198 │ │ │ │ -200}; │ │ │ │ -201 │ │ │ │ -202template <> │ │ │ │ -_2_0_3struct _t_r_a_i_t_s<_C_a_l_3_F_i_s_h_e_y_e> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ -204 │ │ │ │ -205template <> │ │ │ │ -_2_0_6struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ -{}; │ │ │ │ -207 │ │ │ │ -208} // namespace gtsam │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ -_C_a_l_3_._h │ │ │ │ -Common code for all Calibration models. │ │ │ │ +91} // namespace gtsam │ │ │ │ +92 │ │ │ │ +_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_:_:_M_a_n_i_f_o_l_d │ │ │ │ -Both ManifoldTraits and Testable. │ │ │ │ -DDeeffiinniittiioonn Manifold.h:120 │ │ │ │ +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_:_:_e_q_u_a_l_s │ │ │ │ -Template to create a binary predicate. │ │ │ │ -DDeeffiinniittiioonn Testable.h:111 │ │ │ │ -_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_F_i_s_h_e_y_e │ │ │ │ -Calibration of a fisheye camera. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:51 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_4 │ │ │ │ -double k4() const │ │ │ │ -Second tangential distortion coefficient. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:105 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_1 │ │ │ │ -double k1() const │ │ │ │ -First distortion coefficient. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:96 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_3 │ │ │ │ -double k3() const │ │ │ │ -First tangential distortion coefficient. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:102 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector localCoordinates(const Cal3Fisheye &T2) const │ │ │ │ -Given a different calibration, calculate update to obtain it. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:168 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_D_i_m │ │ │ │ -static size_t Dim() │ │ │ │ -Return dimensions of calibration manifold object. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:160 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k_2 │ │ │ │ -double k2() const │ │ │ │ -Second distortion coefficient. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:99 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_d_i_m │ │ │ │ -size_t dim() const override │ │ │ │ -Return dimensions of calibration manifold object. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:157 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_v_e_c_t_o_r │ │ │ │ -Vector9 vector() const │ │ │ │ -Return all parameters as a vector. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.cpp:28 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_c_l_o_n_e │ │ │ │ -virtual boost::shared_ptr< Cal3Fisheye > clone() const │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:177 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_k │ │ │ │ -Vector4 k() const │ │ │ │ -return distortion parameter vector │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:108 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_C_a_l_3_F_i_s_h_e_y_e │ │ │ │ -Cal3Fisheye()=default │ │ │ │ -Default Constructor with only unit focal length. │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_F_i_s_h_e_y_e_:_:_r_e_t_r_a_c_t │ │ │ │ -Cal3Fisheye retract(const Vector &d) const │ │ │ │ -Given delta vector, update calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3Fisheye.h:163 │ │ │ │ +_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 │ │ │ │ - * _C_a_l_3_F_i_s_h_e_y_e_._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/a00455_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2_Base.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholeSet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,151 +98,117 @@ │ │ │
No Matches
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3DS2_Base.h
│ │ │ +
PinholeSet.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
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/geometry/Cal3.h>
│ │ │ - │ │ │ -
24#include <boost/shared_ptr.hpp>
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ + │ │ │ +
22#include <boost/optional.hpp>
│ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │
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
│ │ │ +
29template<class CAMERA>
│ │ │ +
│ │ │ +
30class PinholeSet: public CameraSet<CAMERA> {
│ │ │ +
31
│ │ │ +
32private:
│ │ │ +
33 typedef CameraSet<CAMERA> Base;
│ │ │ +
34 typedef PinholeSet<CAMERA> This;
│ │ │ +
35
│ │ │ +
36protected:
│ │ │ +
37
│ │ │ +
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 Cal3DS2_Base() = default;
│ │ │ -
59
│ │ │ -
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
│ │ │ -
142 inline static size_t Dim() { return dimension; }
│ │ │ -
143
│ │ │ -
147
│ │ │ -
│ │ │ -
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}
│ │ │ -
2D Point
│ │ │ -
Common code for all Calibration models.
│ │ │ +
58
│ │ │ +
│ │ │ + │ │ │ +
61 const typename CAMERA::MeasurementVector& measured,
│ │ │ +
62 const TriangulationParameters& params) const {
│ │ │ +
63 return gtsam::triangulateSafe(*this, measured, params);
│ │ │ +
64 }
│ │ │ +
│ │ │ +
65
│ │ │ +
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
│ │ │ +
Base class to create smart factors on poses or cameras.
│ │ │ +
Functions for triangulation.
│ │ │
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
│ │ │ -
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:41
│ │ │ -
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
│ │ │ +
TriangulationResult triangulateSafe(const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
triangulateSafe: extensive checking of the outcome
Definition triangulation.h:680
│ │ │ +
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 set of cameras, all with their own calibration.
Definition CameraSet.h:36
│ │ │ +
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
│ │ │ +
TriangulationResult is an optional point, along with the reasons why it is invalid.
Definition triangulation.h:626
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,184 +1,134 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3DS2_Base.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 │ │ │ │ -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 │ │ │ │ +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 │ │ │ │ -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 using shared_ptr = boost::shared_ptr; │ │ │ │ -53 │ │ │ │ +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 │ │ │ │ +36protected: │ │ │ │ +37 │ │ │ │ +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 │ │ │ │ -_5_8 _C_a_l_3_D_S_2___B_a_s_e() = default; │ │ │ │ -59 │ │ │ │ -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 │ │ │ │ -_1_4_2 inline static size_t _D_i_m() { return dimension; } │ │ │ │ -143 │ │ │ │ -147 │ │ │ │ -_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} │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ -_C_a_l_3_._h │ │ │ │ -Common code for all Calibration models. │ │ │ │ +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 │ │ │ │ +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 │ │ │ │ +_C_a_m_e_r_a_S_e_t_._h │ │ │ │ +Base class to create smart factors on poses or cameras. │ │ │ │ +_t_r_i_a_n_g_u_l_a_t_i_o_n_._h │ │ │ │ +Functions for triangulation. │ │ │ │ _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_:_:_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 │ │ │ │ -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() │ │ │ │ -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_:_:_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_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_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_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_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 │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * CCaall33DDSS22__BBaassee..hh │ │ │ │ + * _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/a00461.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Fisheye.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,54 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
Cal3DS2.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Cal3Fisheye.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

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::Cal3DS2
 Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimization. More...
 
struct  gtsam::traits< Cal3DS2 >
 
struct  gtsam::traits< const Cal3DS2 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

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
│ │ │ +
Date
Apr 8, 2020
│ │ │ +
Author
ghaggin
│ │ │
│ │ │ Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,40 +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 │ │ │ │ -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_:_:_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_:_:_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_<_ _c_o_n_s_t_ _C_a_l_3_D_S_2_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Cal3Fisheye.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_F_i_s_h_e_y_e &cal) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -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 │ │ │ │ + Apr 8, 2020 │ │ │ │ Author │ │ │ │ - ydjian │ │ │ │ + ghaggin │ │ │ │ Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_D_S_2_._h │ │ │ │ + * _C_a_l_3_F_i_s_h_e_y_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/a00464.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cyclic.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,41 +94,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Cal3DS2.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
Cyclic.cpp File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Cyclic group implementation. │ │ │ +More...

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

│ │ │ Namespaces

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

│ │ │ -Functions

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

Detailed Description

│ │ │ -
Date
Feb 28, 2010
│ │ │ -
Author
ydjian
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ +

Cyclic group implementation.

│ │ │ +
Author
Frank Dellaert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +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 │ │ │ │ -Cal3DS2.cpp File Reference │ │ │ │ +_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. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3_D_S_2 &cal) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Feb 28, 2010 │ │ │ │ +Cyclic group implementation. │ │ │ │ Author │ │ │ │ - ydjian │ │ │ │ - Varun Agrawal │ │ │ │ + Frank Dellaert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_D_S_2_._c_p_p │ │ │ │ + * _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/a00467.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Bundler.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,49 +96,52 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
Cal3Bundler.h File Reference
│ │ │ +
Cal3DS2.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Calibration used by Bundler. │ │ │ +

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::Cal3Bundler
 Calibration used by Bundler. More...
class  gtsam::Cal3DS2
 Calibration of a camera with radial distortion that also supports Lie-group behaviors for optimization. More...
 
struct  gtsam::traits< Cal3Bundler >
struct  gtsam::traits< Cal3DS2 >
 
struct  gtsam::traits< const Cal3Bundler >
struct  gtsam::traits< const Cal3DS2 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Calibration used by Bundler.

│ │ │ -
Date
Sep 25, 2010
│ │ │ -
Author
Yong Dian Jian
│ │ │ +

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
│ │ │
│ │ │ Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 │ │ │ │ -Cal3Bundler.h File Reference │ │ │ │ -Calibration used by Bundler. _M_o_r_e_._._. │ │ │ │ +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_:_:_C_a_l_3_B_u_n_d_l_e_r │ │ │ │ -  Calibration used by Bundler. _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_:_:_t_r_a_i_t_s_<_ _C_a_l_3_B_u_n_d_l_e_r_ _> │ │ │ │ +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_<_ _c_o_n_s_t_ _C_a_l_3_B_u_n_d_l_e_r_ _> │ │ │ │ +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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Calibration used by Bundler. │ │ │ │ +Calibration of a camera with radial distortion, calculations in base class │ │ │ │ +Cal3DS2_Base. │ │ │ │ +Calibration of a camera with radial distortion. │ │ │ │ Date │ │ │ │ - Sep 25, 2010 │ │ │ │ + Feb 28, 2010 │ │ │ │ Author │ │ │ │ - Yong Dian Jian │ │ │ │ + ydjian @autho Varun Agrawal │ │ │ │ + Date │ │ │ │ + Feb 28, 2010 │ │ │ │ + Author │ │ │ │ + ydjian │ │ │ │ Varun Agrawal │ │ │ │ * _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 │ │ │ │ + * _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/a00467.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00467 = [ │ │ │ │ - ["gtsam::traits< Cal3Bundler >", "a02972.html", null], │ │ │ │ - ["gtsam::traits< const Cal3Bundler >", "a02976.html", null] │ │ │ │ + ["gtsam::traits< Cal3DS2 >", "a02984.html", null], │ │ │ │ + ["gtsam::traits< const Cal3DS2 >", "a02988.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00467_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Bundler.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3DS2.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,162 +98,113 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3Bundler.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
│ │ │ -
20#pragma once
│ │ │ -
21
│ │ │ -
22#include <gtsam/geometry/Cal3.h>
│ │ │ - │ │ │ -
24
│ │ │ -
25namespace gtsam {
│ │ │ -
26
│ │ │ -
│ │ │ -
32class GTSAM_EXPORT Cal3Bundler : public Cal3 {
│ │ │ -
33 private:
│ │ │ -
34 double k1_ = 0.0f, k2_ = 0.0f;
│ │ │ -
35 double tol_ = 1e-5;
│ │ │ -
36
│ │ │ -
37 // NOTE: We use the base class fx to represent the common focal length.
│ │ │ -
38 // Also, image center parameters (u0, v0) are not optimized
│ │ │ -
39 // but are treated as constants.
│ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ +
23#include <gtsam/geometry/Cal3DS2_Base.h>
│ │ │ +
24#include <boost/shared_ptr.hpp>
│ │ │ +
25
│ │ │ +
26namespace gtsam {
│ │ │ +
27
│ │ │ +
│ │ │ +
35class GTSAM_EXPORT Cal3DS2 : public Cal3DS2_Base {
│ │ │ +
36 using Base = Cal3DS2_Base;
│ │ │ +
37
│ │ │ +
38 public:
│ │ │ +
39 enum { dimension = 9 };
│ │ │
40
│ │ │ -
41 public:
│ │ │ -
42 enum { dimension = 3 };
│ │ │ +
42 using shared_ptr = boost::shared_ptr<Cal3DS2>;
│ │ │
43
│ │ │ -
45 using shared_ptr = boost::shared_ptr<Cal3Bundler>;
│ │ │
46
│ │ │ +
48 Cal3DS2() = default;
│ │ │
49
│ │ │ -
51 Cal3Bundler() = default;
│ │ │ -
52
│ │ │ -
│ │ │ -
62 Cal3Bundler(double f, double k1, double k2, double u0 = 0, double v0 = 0,
│ │ │ -
63 double tol = 1e-5)
│ │ │ -
64 : Cal3(f, f, 0, u0, v0), k1_(k1), k2_(k2), tol_(tol) {}
│ │ │ -
│ │ │ +
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
│ │ │ -
66 ~Cal3Bundler() override {}
│ │ │ -
67
│ │ │ -
71
│ │ │ -
73 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
74 const Cal3Bundler& cal);
│ │ │ +
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
│ │ │ -
77 void print(const std::string& s = "") const override;
│ │ │ -
78
│ │ │ -
80 bool equals(const Cal3Bundler& K, double tol = 10e-9) const;
│ │ │ -
81
│ │ │ +
79
│ │ │ +
81 Cal3DS2 retract(const Vector& d) const;
│ │ │ +
82
│ │ │ +
84 Vector localCoordinates(const Cal3DS2& T2) const;
│ │ │
85
│ │ │ -
87 inline double k1() const { return k1_; }
│ │ │ +
87 size_t dim() const override { return Dim(); }
│ │ │
88
│ │ │ -
90 inline double k2() const { return k2_; }
│ │ │ +
90 inline static size_t Dim() { return dimension; }
│ │ │
91
│ │ │ -
93 inline double px() const { return u0_; }
│ │ │ -
94
│ │ │ -
96 inline double py() const { return v0_; }
│ │ │ -
97
│ │ │ -
98 Matrix3 K() const override;
│ │ │ -
99 Vector4 k() const;
│ │ │ +
95
│ │ │ +
│ │ │ +
97 boost::shared_ptr<Base> clone() const override {
│ │ │ +
98 return boost::shared_ptr<Base>(new Cal3DS2(*this));
│ │ │ +
99 }
│ │ │ +
│ │ │
100
│ │ │ -
101 Vector3 vector() const;
│ │ │
102
│ │ │ -
103#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
105 inline double GTSAM_DEPRECATED u0() const { return u0_; }
│ │ │ +
103 private:
│ │ │
106
│ │ │ -
108 inline double GTSAM_DEPRECATED v0() const { return v0_; }
│ │ │ -
109#endif
│ │ │ -
110
│ │ │ -
119 Point2 uncalibrate(const Point2& p, OptionalJacobian<2, 3> Dcal = boost::none,
│ │ │ -
120 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
121
│ │ │ -
130 Point2 calibrate(const Point2& pi, OptionalJacobian<2, 3> Dcal = boost::none,
│ │ │ -
131 OptionalJacobian<2, 2> Dp = boost::none) const;
│ │ │ -
132
│ │ │ -
134 Matrix2 D2d_intrinsic(const Point2& p) const;
│ │ │ -
135
│ │ │ -
137 Matrix23 D2d_calibration(const Point2& p) const;
│ │ │ -
138
│ │ │ -
140 Matrix25 D2d_intrinsic_calibration(const Point2& p) const;
│ │ │ -
141
│ │ │ -
145
│ │ │ -
147 size_t dim() const override { return Dim(); }
│ │ │ -
148
│ │ │ -
150 inline static size_t Dim() { return dimension; }
│ │ │ -
151
│ │ │ -
│ │ │ -
153 inline Cal3Bundler retract(const Vector& d) const {
│ │ │ -
154 return Cal3Bundler(fx_ + d(0), k1_ + d(1), k2_ + d(2), u0_, v0_);
│ │ │ -
155 }
│ │ │ -
│ │ │ -
156
│ │ │ -
│ │ │ -
158 Vector3 localCoordinates(const Cal3Bundler& T2) const {
│ │ │ -
159 return T2.vector() - vector();
│ │ │ -
160 }
│ │ │ -
│ │ │ -
161
│ │ │ -
162 private:
│ │ │ -
166
│ │ │ -
168 friend class boost::serialization::access;
│ │ │ -
169 template <class Archive>
│ │ │ -
170 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
171 ar& boost::serialization::make_nvp(
│ │ │ -
172 "Cal3Bundler", boost::serialization::base_object<Cal3>(*this));
│ │ │ -
173 ar& BOOST_SERIALIZATION_NVP(k1_);
│ │ │ -
174 ar& BOOST_SERIALIZATION_NVP(k2_);
│ │ │ -
175 ar& BOOST_SERIALIZATION_NVP(tol_);
│ │ │ -
176 }
│ │ │ -
177
│ │ │ -
179};
│ │ │ -
│ │ │ -
180
│ │ │ -
181template <>
│ │ │ -
182struct traits<Cal3Bundler> : public internal::Manifold<Cal3Bundler> {};
│ │ │ -
183
│ │ │ -
184template <>
│ │ │ -
185struct traits<const Cal3Bundler> : public internal::Manifold<Cal3Bundler> {};
│ │ │ -
186
│ │ │ -
187} // namespace gtsam
│ │ │ -
2D Point
│ │ │ -
Common code for all Calibration models.
│ │ │ +
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
│ │ │ -
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
│ │ │ +
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │
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
│ │ │ -
Common base class for all calibration models.
Definition Cal3.h:69
│ │ │ -
Calibration used by Bundler.
Definition Cal3Bundler.h:32
│ │ │ -
double k1() const
distorsion parameter k1
Definition Cal3Bundler.h:87
│ │ │ -
double k2() const
distorsion parameter k2
Definition Cal3Bundler.h:90
│ │ │ -
Cal3Bundler()=default
Default constructor.
│ │ │ -
Cal3Bundler retract(const Vector &d) const
Update calibration with tangent space delta.
Definition Cal3Bundler.h:153
│ │ │ -
double py() const
image center in y
Definition Cal3Bundler.h:96
│ │ │ -
Cal3Bundler(double f, double k1, double k2, double u0=0, double v0=0, double tol=1e-5)
Constructor.
Definition Cal3Bundler.h:62
│ │ │ -
Vector3 localCoordinates(const Cal3Bundler &T2) const
Calculate local coordinates to another calibration.
Definition Cal3Bundler.h:158
│ │ │ -
double px() const
image center in x
Definition Cal3Bundler.h:93
│ │ │ -
size_t dim() const override
return DOF, dimensionality of tangent space
Definition Cal3Bundler.h:147
│ │ │ -
static size_t Dim()
return DOF, dimensionality of tangent space
Definition Cal3Bundler.h:150
│ │ │ +
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,196 +1,126 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3Bundler.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 │ │ │ │ -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 │ │ │ │ -25namespace _g_t_s_a_m { │ │ │ │ -26 │ │ │ │ -_3_2class GTSAM_EXPORT _C_a_l_3_B_u_n_d_l_e_r : public _C_a_l_3 { │ │ │ │ -33 private: │ │ │ │ -34 double k1_ = 0.0f, k2_ = 0.0f; │ │ │ │ -35 double tol_ = 1e-5; │ │ │ │ -36 │ │ │ │ -37 // NOTE: We use the base class fx to represent the common focal length. │ │ │ │ -38 // Also, image center parameters (u0, v0) are not optimized │ │ │ │ -39 // but are treated as constants. │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26namespace _g_t_s_a_m { │ │ │ │ +27 │ │ │ │ +_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 │ │ │ │ -41 public: │ │ │ │ -42 enum { dimension = 3 }; │ │ │ │ +42 using shared_ptr = boost::shared_ptr; │ │ │ │ 43 │ │ │ │ -45 using shared_ptr = boost::shared_ptr; │ │ │ │ 46 │ │ │ │ +_4_8 _C_a_l_3_D_S_2() = default; │ │ │ │ 49 │ │ │ │ -_5_1 _C_a_l_3_B_u_n_d_l_e_r() = default; │ │ │ │ -52 │ │ │ │ -_6_2 _C_a_l_3_B_u_n_d_l_e_r(double f, double k1, double k2, double u0 = 0, double v0 = 0, │ │ │ │ -63 double tol = 1e-5) │ │ │ │ -64 : _C_a_l_3(f, f, 0, u0, v0), k1_(k1), k2_(k2), tol_(tol) {} │ │ │ │ +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 │ │ │ │ -66 _~_C_a_l_3_B_u_n_d_l_e_r() override {} │ │ │ │ -67 │ │ │ │ -71 │ │ │ │ -73 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -74 const Cal3Bundler& cal); │ │ │ │ +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 │ │ │ │ -77 void print(const std::string& s = "") const override; │ │ │ │ -78 │ │ │ │ -80 bool equals(const Cal3Bundler& K, double tol = 10e-9) const; │ │ │ │ -81 │ │ │ │ +79 │ │ │ │ +81 Cal3DS2 retract(const Vector& d) const; │ │ │ │ +82 │ │ │ │ +84 Vector localCoordinates(const Cal3DS2& T2) const; │ │ │ │ 85 │ │ │ │ -_8_7 inline double _k_1() const { return k1_; } │ │ │ │ +_8_7 size_t _d_i_m() const override { return Dim(); } │ │ │ │ 88 │ │ │ │ -_9_0 inline double _k_2() const { return k2_; } │ │ │ │ +_9_0 inline static size_t _D_i_m() { return dimension; } │ │ │ │ 91 │ │ │ │ -_9_3 inline double _p_x() const { return u0_; } │ │ │ │ -94 │ │ │ │ -_9_6 inline double _p_y() const { return v0_; } │ │ │ │ -97 │ │ │ │ -98 Matrix3 K() const override; │ │ │ │ -99 Vector4 k() const; │ │ │ │ +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 │ │ │ │ -101 Vector3 vector() const; │ │ │ │ 102 │ │ │ │ -103#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -105 inline double GTSAM_DEPRECATED u0() const { return u0_; } │ │ │ │ +103 private: │ │ │ │ 106 │ │ │ │ -108 inline double GTSAM_DEPRECATED v0() const { return v0_; } │ │ │ │ -109#endif │ │ │ │ -110 │ │ │ │ -119 _P_o_i_n_t_2 uncalibrate(const Point2& p, OptionalJacobian<2, 3> Dcal = boost:: │ │ │ │ -none, │ │ │ │ -120 OptionalJacobian<2, 2> Dp = boost::none) const; │ │ │ │ -121 │ │ │ │ -130 _P_o_i_n_t_2 calibrate(const Point2& pi, OptionalJacobian<2, 3> Dcal = boost:: │ │ │ │ -none, │ │ │ │ -131 OptionalJacobian<2, 2> Dp = boost::none) const; │ │ │ │ -132 │ │ │ │ -134 Matrix2 D2d_intrinsic(const Point2& p) const; │ │ │ │ -135 │ │ │ │ -137 Matrix23 D2d_calibration(const Point2& p) const; │ │ │ │ -138 │ │ │ │ -140 Matrix25 D2d_intrinsic_calibration(const Point2& p) const; │ │ │ │ -141 │ │ │ │ -145 │ │ │ │ -_1_4_7 size_t _d_i_m() const override { return Dim(); } │ │ │ │ -148 │ │ │ │ -_1_5_0 inline static size_t _D_i_m() { return dimension; } │ │ │ │ -151 │ │ │ │ -_1_5_3 inline _C_a_l_3_B_u_n_d_l_e_r _r_e_t_r_a_c_t(const Vector& d) const { │ │ │ │ -154 return _C_a_l_3_B_u_n_d_l_e_r(fx_ + d(0), k1_ + d(1), k2_ + d(2), u0_, v0_); │ │ │ │ -155 } │ │ │ │ -156 │ │ │ │ -_1_5_8 Vector3 _l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s(const _C_a_l_3_B_u_n_d_l_e_r& T2) const { │ │ │ │ -159 return T2.vector() - vector(); │ │ │ │ -160 } │ │ │ │ -161 │ │ │ │ -162 private: │ │ │ │ -166 │ │ │ │ -_1_6_8 friend class boost::serialization::access; │ │ │ │ -169 template │ │ │ │ -170 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -171 ar& boost::serialization::make_nvp( │ │ │ │ -172 "Cal3Bundler", boost::serialization::base_object(*this)); │ │ │ │ -173 ar& BOOST_SERIALIZATION_NVP(k1_); │ │ │ │ -174 ar& BOOST_SERIALIZATION_NVP(k2_); │ │ │ │ -175 ar& BOOST_SERIALIZATION_NVP(tol_); │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -179}; │ │ │ │ -180 │ │ │ │ -181template <> │ │ │ │ -_1_8_2struct _t_r_a_i_t_s<_C_a_l_3_B_u_n_d_l_e_r> : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d {}; │ │ │ │ -183 │ │ │ │ -184template <> │ │ │ │ -_1_8_5struct _t_r_a_i_t_s : public _i_n_t_e_r_n_a_l_:_:_M_a_n_i_f_o_l_d │ │ │ │ -{}; │ │ │ │ -186 │ │ │ │ -187} // namespace gtsam │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ -_C_a_l_3_._h │ │ │ │ -Common code for all Calibration models. │ │ │ │ +_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_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_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_:_:_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_:_:_C_a_l_3 │ │ │ │ -Common base class for all calibration models. │ │ │ │ -DDeeffiinniittiioonn Cal3.h:69 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r │ │ │ │ -Calibration used by Bundler. │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:32 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_k_1 │ │ │ │ -double k1() const │ │ │ │ -distorsion parameter k1 │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:87 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_k_2 │ │ │ │ -double k2() const │ │ │ │ -distorsion parameter k2 │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:90 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_C_a_l_3_B_u_n_d_l_e_r │ │ │ │ -Cal3Bundler()=default │ │ │ │ -Default constructor. │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_r_e_t_r_a_c_t │ │ │ │ -Cal3Bundler retract(const Vector &d) const │ │ │ │ -Update calibration with tangent space delta. │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:153 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_p_y │ │ │ │ -double py() const │ │ │ │ -image center in y │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:96 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_C_a_l_3_B_u_n_d_l_e_r │ │ │ │ -Cal3Bundler(double f, double k1, double k2, double u0=0, double v0=0, double │ │ │ │ -tol=1e-5) │ │ │ │ -Constructor. │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:62 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_l_o_c_a_l_C_o_o_r_d_i_n_a_t_e_s │ │ │ │ -Vector3 localCoordinates(const Cal3Bundler &T2) const │ │ │ │ -Calculate local coordinates to another calibration. │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:158 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_p_x │ │ │ │ -double px() const │ │ │ │ -image center in x │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:93 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_d_i_m │ │ │ │ +_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 DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:147 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_B_u_n_d_l_e_r_:_:_D_i_m │ │ │ │ +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() │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3Bundler.h:150 │ │ │ │ +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 │ │ │ │ - * _C_a_l_3_B_u_n_d_l_e_r_._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/a00470.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3Bundler.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/PinholePose.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,39 +94,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
Cal3Bundler.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
PinholePose.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Pinhole camera with known calibration. │ │ │ +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.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

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

Detailed Description

│ │ │ -
Date
Sep 25, 2010
│ │ │ -
Author
ydjian
│ │ │ +

Pinhole camera with known calibration.

│ │ │ +
Author
Yong-Dian Jian
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
Feb 20, 2015
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,37 @@ │ │ │ │ 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 │ │ │ │ -Cal3Bundler.cpp File Reference │ │ │ │ +_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_ _>_ _> │ │ │ │ +  │ │ │ │ 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 ********** │ │ │ │ - Date │ │ │ │ - Sep 25, 2010 │ │ │ │ +Pinhole camera with known calibration. │ │ │ │ Author │ │ │ │ - ydjian │ │ │ │ + Yong-Dian Jian │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + Feb 20, 2015 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_B_u_n_d_l_e_r_._c_p_p │ │ │ │ + * _P_i_n_h_o_l_e_P_o_s_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/a00473.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -97,49 +97,58 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
Cal3.h File Reference
│ │ │ +
Similarity3.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Common code for all Calibration models. │ │ │ +

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

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::Cal3
 Common base class for all calibration models. More...
class  gtsam::Similarity3
 3D similarity transform More...
 
struct  gtsam::Similarity3::ChartAtOrigin
 Chart at the origin. More...
 
struct  gtsam::traits< Similarity3 >
 
struct  gtsam::traits< const Similarity3 >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ 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.
 
│ │ │ +template<>
Matrix gtsam::wedge< Similarity3 > (const Vector &xi)
 
│ │ │

Detailed Description

│ │ │ -

Common code for all Calibration models.

│ │ │ -
Author
Varun Agrawal
│ │ │ +

Implementation of Similarity3 transform.

│ │ │ +
Author
Paul Drews
│ │ │ +
│ │ │ +John Lambert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,33 +1,37 @@ │ │ │ │ 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 │ │ │ │ -Cal3.h File Reference │ │ │ │ -Common code for all Calibration models. _M_o_r_e_._._. │ │ │ │ +Similarity3.h File Reference │ │ │ │ +Implementation of Similarity3 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_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _g_t_s_a_m_:_:_C_a_l_3 │ │ │ │ -  Common base class for all calibration models. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_S_i_m_i_l_a_r_i_t_y_3 │ │ │ │ +  3D similarity transform _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_<_ _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_ _> │ │ │ │   │ │ │ │ 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. │ │ │ │ +template<> │ │ │ │ + Matrix  ggttssaamm::::wweeddggee<< SSiimmiillaarriittyy33 >> (const Vector &xi) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Common code for all Calibration models. │ │ │ │ +Implementation of Similarity3 transform. │ │ │ │ Author │ │ │ │ - Varun Agrawal │ │ │ │ + Paul Drews │ │ │ │ + John Lambert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_._h │ │ │ │ + * _S_i_m_i_l_a_r_i_t_y_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/a00473.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,6 @@ │ │ │ │ var a00473 = [ │ │ │ │ - ["calibrateJacobians", "a00473.html#a9ac814fcc4484bce32e4616d69afb225", null] │ │ │ │ + ["gtsam::Similarity3", "a03264.html", "a03264"], │ │ │ │ + ["gtsam::Similarity3::ChartAtOrigin", "a03268.html", null], │ │ │ │ + ["gtsam::traits< Similarity3 >", "a03272.html", null], │ │ │ │ + ["gtsam::traits< const Similarity3 >", "a03276.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00473_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,177 +98,181 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
Cal3.h
│ │ │ +
Similarity3.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#pragma once
│ │ │ -
23
│ │ │ - │ │ │ -
25
│ │ │ -
26namespace gtsam {
│ │ │ +
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>
│ │ │
27
│ │ │ -
46template <typename Cal, size_t Dim>
│ │ │ -
│ │ │ -
47void calibrateJacobians(const Cal& calibration, const Point2& pn,
│ │ │ -
48 OptionalJacobian<2, Dim> Dcal = boost::none,
│ │ │ -
49 OptionalJacobian<2, 2> Dp = boost::none) {
│ │ │ -
50 if (Dcal || Dp) {
│ │ │ -
51 Eigen::Matrix<double, 2, Dim> H_uncal_K;
│ │ │ -
52 Matrix22 H_uncal_pn, H_uncal_pn_inv;
│ │ │ -
53
│ │ │ -
54 // Compute uncalibrate Jacobians
│ │ │ -
55 calibration.uncalibrate(pn, Dcal ? &H_uncal_K : nullptr, H_uncal_pn);
│ │ │ -
56
│ │ │ -
57 H_uncal_pn_inv = H_uncal_pn.inverse();
│ │ │ -
58
│ │ │ -
59 if (Dp) *Dp = H_uncal_pn_inv;
│ │ │ -
60 if (Dcal) *Dcal = -H_uncal_pn_inv * H_uncal_K;
│ │ │ -
61 }
│ │ │ -
62}
│ │ │ -
│ │ │ +
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
│ │ │ -
│ │ │ -
69class GTSAM_EXPORT Cal3 {
│ │ │ -
70 protected:
│ │ │ -
71 double fx_ = 1.0f, fy_ = 1.0f;
│ │ │ -
72 double s_ = 0.0f;
│ │ │ -
73 double u0_ = 0.0f, v0_ = 0.0f;
│ │ │ -
74
│ │ │ -
75 public:
│ │ │ -
76 enum { dimension = 5 };
│ │ │ -
78 using shared_ptr = boost::shared_ptr<Cal3>;
│ │ │ +
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;
│ │ │
79
│ │ │ -
82
│ │ │ -
84 Cal3() = default;
│ │ │ +
80 friend std::ostream& operator<<(std::ostream& os, const Similarity3& p);
│ │ │ +
81
│ │ │
85
│ │ │ -
│ │ │ -
87 Cal3(double fx, double fy, double s, double u0, double v0)
│ │ │ -
88 : fx_(fx), fy_(fy), s_(s), u0_(u0), v0_(v0) {}
│ │ │ -
│ │ │ -
89
│ │ │ -
│ │ │ -
91 Cal3(const Vector5& d)
│ │ │ -
92 : fx_(d(0)), fy_(d(1)), s_(d(2)), u0_(d(3)), v0_(d(4)) {}
│ │ │ -
│ │ │ -
93
│ │ │ -
100 Cal3(double fov, int w, int h);
│ │ │ -
101
│ │ │ -
103 virtual ~Cal3() {}
│ │ │ -
104
│ │ │ -
108
│ │ │ -
118 Cal3(const std::string& path);
│ │ │ +
87 static Similarity3 Identity();
│ │ │ +
88
│ │ │ +
90 Similarity3 operator*(const Similarity3& S) const;
│ │ │ +
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
│ │ │ -
125 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os,
│ │ │ -
126 const Cal3& cal);
│ │ │ -
127
│ │ │ -
129 virtual void print(const std::string& s = "") const;
│ │ │ -
130
│ │ │ -
132 bool equals(const Cal3& K, double tol = 10e-9) const;
│ │ │ -
133
│ │ │ -
137
│ │ │ -
139 inline double fx() const { return fx_; }
│ │ │ +
123 static Similarity3 Align(const Point3Pairs& abPointPairs);
│ │ │ +
124
│ │ │ +
135 static Similarity3 Align(const std::vector<Pose3Pair>& abPosePairs);
│ │ │ +
136
│ │ │
140
│ │ │ -
142 inline double fy() const { return fy_; }
│ │ │ -
143
│ │ │ -
145 inline double aspectRatio() const { return fx_ / fy_; }
│ │ │ +
144 static Vector7 Logmap(const Similarity3& s, //
│ │ │ +
145 OptionalJacobian<7, 7> Hm = boost::none);
│ │ │
146
│ │ │ -
148 inline double skew() const { return s_; }
│ │ │ -
149
│ │ │ -
151 inline double px() const { return u0_; }
│ │ │ -
152
│ │ │ -
154 inline double py() const { return v0_; }
│ │ │ -
155
│ │ │ -
157 Point2 principalPoint() const { return Point2(u0_, v0_); }
│ │ │ -
158
│ │ │ -
│ │ │ -
160 Vector5 vector() const {
│ │ │ -
161 Vector5 v;
│ │ │ -
162 v << fx_, fy_, s_, u0_, v0_;
│ │ │ -
163 return v;
│ │ │ -
164 }
│ │ │ +
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
│ │ │ -
│ │ │ -
167 virtual Matrix3 K() const {
│ │ │ -
168 Matrix3 K;
│ │ │ -
169 K << fx_, s_, u0_, 0.0, fy_, v0_, 0.0, 0.0, 1.0;
│ │ │ -
170 return K;
│ │ │ -
171 }
│ │ │ -
│ │ │ -
172
│ │ │ -
173#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42
│ │ │ -
175 Matrix3 GTSAM_DEPRECATED matrix() const { return K(); }
│ │ │ -
176#endif
│ │ │ -
177
│ │ │ -
179 Matrix3 inverse() const;
│ │ │ +
172 static Matrix4 wedge(const Vector7& xi);
│ │ │ +
173
│ │ │ +
175 Matrix7 AdjointMap() const;
│ │ │ +
176
│ │ │
180
│ │ │ -
182 inline virtual size_t dim() const { return Dim(); }
│ │ │ +
182 Matrix4 matrix() const;
│ │ │
183
│ │ │ -
185 inline static size_t Dim() { return dimension; }
│ │ │ +
185 Rot3 rotation() const { return R_; }
│ │ │
186
│ │ │ -
190
│ │ │ -
191 private:
│ │ │ -
193 friend class boost::serialization::access;
│ │ │ -
194 template <class Archive>
│ │ │ -
195 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
196 ar& BOOST_SERIALIZATION_NVP(fx_);
│ │ │ -
197 ar& BOOST_SERIALIZATION_NVP(fy_);
│ │ │ -
198 ar& BOOST_SERIALIZATION_NVP(s_);
│ │ │ -
199 ar& BOOST_SERIALIZATION_NVP(u0_);
│ │ │ -
200 ar& BOOST_SERIALIZATION_NVP(v0_);
│ │ │ -
201 }
│ │ │ +
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
│ │ │ -
204};
│ │ │ -
│ │ │ -
205
│ │ │ -
206} // \ namespace gtsam
│ │ │ -
2D Point
│ │ │ +
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 Lie types.
│ │ │ +
Base class and basic functions for Manifold types.
│ │ │ +
3D rotation represented as a rotation matrix or quaternion
│ │ │ +
3D Pose
│ │ │ +
3D 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
│ │ │ -
void 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...
Definition Cal3.h:47
│ │ │ +
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
│ │ │ -
Common base class for all calibration models.
Definition Cal3.h:69
│ │ │ -
Cal3(double fx, double fy, double s, double u0, double v0)
constructor from doubles
Definition Cal3.h:87
│ │ │ -
virtual Matrix3 K() const
return calibration matrix K
Definition Cal3.h:167
│ │ │ -
Cal3(const Vector5 &d)
constructor from vector
Definition Cal3.h:91
│ │ │ -
virtual ~Cal3()
Virtual destructor.
Definition Cal3.h:103
│ │ │ -
Vector5 vector() const
vectorized form (column-wise)
Definition Cal3.h:160
│ │ │ -
Cal3()=default
Create a default calibration that leaves coordinates unchanged.
│ │ │ -
double px() const
image center in x
Definition Cal3.h:151
│ │ │ -
static size_t Dim()
return DOF, dimensionality of tangent space
Definition Cal3.h:185
│ │ │ -
Point2 principalPoint() const
return the principal point
Definition Cal3.h:157
│ │ │ -
double fx() const
focal length x
Definition Cal3.h:139
│ │ │ -
double py() const
image center in y
Definition Cal3.h:154
│ │ │ -
double skew() const
skew
Definition Cal3.h:148
│ │ │ -
virtual size_t dim() const
return DOF, dimensionality of tangent space
Definition Cal3.h:182
│ │ │ -
double aspectRatio() const
aspect ratio
Definition Cal3.h:145
│ │ │ -
double fy() const
focal length y
Definition Cal3.h:142
│ │ │ +
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
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,224 +1,233 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -Cal3.h │ │ │ │ +Similarity3.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#pragma once │ │ │ │ -23 │ │ │ │ -24#include <_g_t_s_a_m_/_g_e_o_m_e_t_r_y_/_P_o_i_n_t_2_._h> │ │ │ │ -25 │ │ │ │ -26namespace _g_t_s_a_m { │ │ │ │ +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> │ │ │ │ 27 │ │ │ │ -46template │ │ │ │ -_4_7void _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, │ │ │ │ -48 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _D_i_m_> Dcal = boost::none, │ │ │ │ -49 _O_p_t_i_o_n_a_l_J_a_c_o_b_i_a_n_<_2_,_ _2_> Dp = boost::none) { │ │ │ │ -50 if (Dcal || Dp) { │ │ │ │ -51 Eigen::Matrix H_uncal_K; │ │ │ │ -52 Matrix22 H_uncal_pn, H_uncal_pn_inv; │ │ │ │ -53 │ │ │ │ -54 // Compute uncalibrate Jacobians │ │ │ │ -55 calibration.uncalibrate(pn, Dcal ? &H_uncal_K : nullptr, H_uncal_pn); │ │ │ │ -56 │ │ │ │ -57 H_uncal_pn_inv = H_uncal_pn.inverse(); │ │ │ │ -58 │ │ │ │ -59 if (Dp) *Dp = H_uncal_pn_inv; │ │ │ │ -60 if (Dcal) *Dcal = -H_uncal_pn_inv * H_uncal_K; │ │ │ │ -61 } │ │ │ │ -62} │ │ │ │ +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 │ │ │ │ -_6_9class GTSAM_EXPORT _C_a_l_3 { │ │ │ │ -70 protected: │ │ │ │ -_7_1 double fx_ = 1.0f, fy_ = 1.0f; │ │ │ │ -_7_2 double s_ = 0.0f; │ │ │ │ -_7_3 double u0_ = 0.0f, v0_ = 0.0f; │ │ │ │ -74 │ │ │ │ -75 public: │ │ │ │ -76 enum { dimension = 5 }; │ │ │ │ -78 using shared_ptr = boost::shared_ptr; │ │ │ │ +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; │ │ │ │ 79 │ │ │ │ -82 │ │ │ │ -_8_4 _C_a_l_3() = default; │ │ │ │ +80 friend std::ostream& operator<<(std::ostream& os, const _S_i_m_i_l_a_r_i_t_y_3& p); │ │ │ │ +81 │ │ │ │ 85 │ │ │ │ -_8_7 _C_a_l_3(double fx, double fy, double s, double u0, double v0) │ │ │ │ -88 : fx_(fx), fy_(fy), s_(s), u0_(u0), v0_(v0) {} │ │ │ │ -89 │ │ │ │ -_9_1 _C_a_l_3(const Vector5& d) │ │ │ │ -92 : fx_(d(0)), fy_(d(1)), s_(d(2)), u0_(d(3)), v0_(d(4)) {} │ │ │ │ -93 │ │ │ │ -100 _C_a_l_3(double fov, int w, int h); │ │ │ │ -101 │ │ │ │ -_1_0_3 virtual _~_C_a_l_3() {} │ │ │ │ -104 │ │ │ │ -108 │ │ │ │ -118 _C_a_l_3(const std::string& path); │ │ │ │ +87 static _S_i_m_i_l_a_r_i_t_y_3 Identity(); │ │ │ │ +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; │ │ │ │ +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 │ │ │ │ -125 GTSAM_EXPORT friend std::ostream& operator<<(std::ostream& os, │ │ │ │ -126 const _C_a_l_3& cal); │ │ │ │ -127 │ │ │ │ -129 virtual void _p_r_i_n_t(const std::string& s = "") const; │ │ │ │ -130 │ │ │ │ -132 bool _e_q_u_a_l_s(const _C_a_l_3& K, double tol = 10e-9) const; │ │ │ │ -133 │ │ │ │ -137 │ │ │ │ -_1_3_9 inline double _f_x() const { return fx_; } │ │ │ │ +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 │ │ │ │ -_1_4_2 inline double _f_y() const { return fy_; } │ │ │ │ -143 │ │ │ │ -_1_4_5 inline double _a_s_p_e_c_t_R_a_t_i_o() const { return fx_ / fy_; } │ │ │ │ +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 │ │ │ │ -_1_4_8 inline double _s_k_e_w() const { return s_; } │ │ │ │ -149 │ │ │ │ -_1_5_1 inline double _p_x() const { return u0_; } │ │ │ │ -152 │ │ │ │ -_1_5_4 inline double _p_y() const { return v0_; } │ │ │ │ -155 │ │ │ │ -_1_5_7 _P_o_i_n_t_2 _p_r_i_n_c_i_p_a_l_P_o_i_n_t() const { return _P_o_i_n_t_2(u0_, v0_); } │ │ │ │ -158 │ │ │ │ -_1_6_0 Vector5 _v_e_c_t_o_r() const { │ │ │ │ -161 Vector5 v; │ │ │ │ -162 v << fx_, fy_, s_, u0_, v0_; │ │ │ │ -163 return v; │ │ │ │ -164 } │ │ │ │ +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 │ │ │ │ -_1_6_7 virtual Matrix3 _K() const { │ │ │ │ -168 Matrix3 K; │ │ │ │ -169 K << fx_, s_, u0_, 0.0, fy_, v0_, 0.0, 0.0, 1.0; │ │ │ │ -170 return K; │ │ │ │ -171 } │ │ │ │ -172 │ │ │ │ -173#ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V42 │ │ │ │ -175 Matrix3 GTSAM_DEPRECATED matrix() const { return K(); } │ │ │ │ -176#endif │ │ │ │ -177 │ │ │ │ -179 Matrix3 inverse() const; │ │ │ │ +172 static Matrix4 _w_e_d_g_e(const Vector7& xi); │ │ │ │ +173 │ │ │ │ +175 Matrix7 AdjointMap() const; │ │ │ │ +176 │ │ │ │ 180 │ │ │ │ -_1_8_2 inline virtual size_t _d_i_m() const { return Dim(); } │ │ │ │ +182 Matrix4 matrix() const; │ │ │ │ 183 │ │ │ │ -_1_8_5 inline static size_t _D_i_m() { return dimension; } │ │ │ │ +_1_8_5 _R_o_t_3 _r_o_t_a_t_i_o_n() const { return R_; } │ │ │ │ 186 │ │ │ │ -190 │ │ │ │ -191 private: │ │ │ │ -_1_9_3 friend class boost::serialization::access; │ │ │ │ -194 template │ │ │ │ -195 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -196 ar& BOOST_SERIALIZATION_NVP(fx_); │ │ │ │ -197 ar& BOOST_SERIALIZATION_NVP(fy_); │ │ │ │ -198 ar& BOOST_SERIALIZATION_NVP(s_); │ │ │ │ -199 ar& BOOST_SERIALIZATION_NVP(u0_); │ │ │ │ -200 ar& BOOST_SERIALIZATION_NVP(v0_); │ │ │ │ -201 } │ │ │ │ +_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 │ │ │ │ -204}; │ │ │ │ -205 │ │ │ │ -206} // \ namespace gtsam │ │ │ │ -_P_o_i_n_t_2_._h │ │ │ │ -2D Point │ │ │ │ +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 │ │ │ │ +_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_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 │ │ │ │ _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_:_:_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 Point2 to Vector2... │ │ │ │ -DDeeffiinniittiioonn Point2.h:27 │ │ │ │ -_g_t_s_a_m_:_:_c_a_l_i_b_r_a_t_e_J_a_c_o_b_i_a_n_s │ │ │ │ -void 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... │ │ │ │ -DDeeffiinniittiioonn Cal3.h:47 │ │ │ │ +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_:_:_C_a_l_3 │ │ │ │ -Common base class for all calibration models. │ │ │ │ -DDeeffiinniittiioonn Cal3.h:69 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_C_a_l_3 │ │ │ │ -Cal3(double fx, double fy, double s, double u0, double v0) │ │ │ │ -constructor from doubles │ │ │ │ -DDeeffiinniittiioonn Cal3.h:87 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_K │ │ │ │ -virtual Matrix3 K() const │ │ │ │ -return calibration matrix K │ │ │ │ -DDeeffiinniittiioonn Cal3.h:167 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_C_a_l_3 │ │ │ │ -Cal3(const Vector5 &d) │ │ │ │ -constructor from vector │ │ │ │ -DDeeffiinniittiioonn Cal3.h:91 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_~_C_a_l_3 │ │ │ │ -virtual ~Cal3() │ │ │ │ -Virtual destructor. │ │ │ │ -DDeeffiinniittiioonn Cal3.h:103 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_v_e_c_t_o_r │ │ │ │ -Vector5 vector() const │ │ │ │ -vectorized form (column-wise) │ │ │ │ -DDeeffiinniittiioonn Cal3.h:160 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_C_a_l_3 │ │ │ │ -Cal3()=default │ │ │ │ -Create a default calibration that leaves coordinates unchanged. │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_p_x │ │ │ │ -double px() const │ │ │ │ -image center in x │ │ │ │ -DDeeffiinniittiioonn Cal3.h:151 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_D_i_m │ │ │ │ +_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 │ │ │ │ static size_t Dim() │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3.h:185 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_p_r_i_n_c_i_p_a_l_P_o_i_n_t │ │ │ │ -Point2 principalPoint() const │ │ │ │ -return the principal point │ │ │ │ -DDeeffiinniittiioonn Cal3.h:157 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_f_x │ │ │ │ -double fx() const │ │ │ │ -focal length x │ │ │ │ -DDeeffiinniittiioonn Cal3.h:139 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_p_y │ │ │ │ -double py() const │ │ │ │ -image center in y │ │ │ │ -DDeeffiinniittiioonn Cal3.h:154 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_s_k_e_w │ │ │ │ -double skew() const │ │ │ │ -skew │ │ │ │ -DDeeffiinniittiioonn Cal3.h:148 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_d_i_m │ │ │ │ -virtual size_t dim() const │ │ │ │ -return DOF, dimensionality of tangent space │ │ │ │ -DDeeffiinniittiioonn Cal3.h:182 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_a_s_p_e_c_t_R_a_t_i_o │ │ │ │ -double aspectRatio() const │ │ │ │ -aspect ratio │ │ │ │ -DDeeffiinniittiioonn Cal3.h:145 │ │ │ │ -_g_t_s_a_m_:_:_C_a_l_3_:_:_f_y │ │ │ │ -double fy() const │ │ │ │ -focal length y │ │ │ │ -DDeeffiinniittiioonn Cal3.h:142 │ │ │ │ +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 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_._h │ │ │ │ + * _S_i_m_i_l_a_r_i_t_y_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/a00476.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Cal3.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Similarity3.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,40 +96,42 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces | │ │ │ Functions
│ │ │ -
Cal3.cpp File Reference
│ │ │ +
Similarity3.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Common code for all calibration models. │ │ │ +

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

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

│ │ │ Namespaces

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

Common code for all calibration models.

│ │ │ -
Author
Frank Dellaert
│ │ │ +

Implementation of Similarity3 transform.

│ │ │ +
Author
Paul Drews
│ │ │ +
│ │ │ +John Lambert
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,24 @@ │ │ │ │ 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 │ │ │ │ -Cal3.cpp File Reference │ │ │ │ -Common code for all calibration models. _M_o_r_e_._._. │ │ │ │ +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. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _C_a_l_3 &cal) │ │ │ │ +std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _S_i_m_i_l_a_r_i_t_y_3 &p) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Common code for all calibration models. │ │ │ │ +Implementation of Similarity3 transform. │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Paul Drews │ │ │ │ + John Lambert │ │ │ │ * _g_t_s_a_m │ │ │ │ * _g_e_o_m_e_t_r_y │ │ │ │ - * _C_a_l_3_._c_p_p │ │ │ │ + * _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/a00479.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/BearingRange.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/geometry/Rot3Q.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -93,52 +93,27 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
BearingRange.h File Reference
│ │ │ +
Rot3Q.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Bearing-Range product. │ │ │ +

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

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

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::traits< BearingRange< A1, A2 > >
 
struct  gtsam::HasBearing< A1, A2, RT >
 
struct  gtsam::HasRange< A1, A2, RT >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

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

Detailed Description

│ │ │ -

Bearing-Range product.

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

Rotation (internal: quaternion representation*)

│ │ │ +
Author
Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,38 +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 │ │ │ │ -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 │ │ │ │ -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_:_:_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_:_:_H_a_s_B_e_a_r_i_n_g_<_ _A_1_,_ _A_2_,_ _R_T_ _> │ │ │ │ -  │ │ │ │ -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. │ │ │ │ -  │ │ │ │ +Rot3Q.cpp File Reference │ │ │ │ +Rotation (internal: quaternion representation*) _M_o_r_e_._._. │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Bearing-Range product. │ │ │ │ - Date │ │ │ │ - July, 2015 │ │ │ │ +Rotation (internal: quaternion representation*) │ │ │ │ Author │ │ │ │ - Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _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 │ │ │ │ + * _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/a00482.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/MixtureFactor.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,47 +94,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
MixtureFactor.h File Reference
│ │ │ +
HybridNonlinearISAM.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Nonlinear Mixture factor of continuous and discrete. │ │ │ -More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::MixtureFactor
 Implementation of a discrete conditional mixture factor. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Nonlinear Mixture factor of continuous and discrete.

│ │ │ -
Author
Kevin Doherty, kdohe.nosp@m.rty@.nosp@m.mit.e.nosp@m.du
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ -
Date
December 2021
│ │ │ +
Date
Sep 12, 2022
│ │ │ +
Author
Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -MixtureFactor.h File Reference │ │ │ │ -Nonlinear Mixture factor of continuous and discrete. _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_:_:_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ -  Implementation of a discrete conditional mixture factor. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridNonlinearISAM.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Nonlinear Mixture factor of continuous and discrete. │ │ │ │ + Date │ │ │ │ + Sep 12, 2022 │ │ │ │ Author │ │ │ │ - Kevin Doherty, _k_d_o_h_e_._n_o_s_p_@_m_._r_t_y_@_._n_o_s_p_@_m_._m_i_t_._e_._n_o_s_p_@_m_._d_u │ │ │ │ Varun Agrawal │ │ │ │ - Date │ │ │ │ - December 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _M_i_x_t_u_r_e_F_a_c_t_o_r_._h │ │ │ │ + * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_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/a00485.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridValues.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactorGraph.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,43 +94,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
HybridValues.h File Reference
│ │ │ +
HybridFactorGraph.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Go to the source code of this file.

│ │ │ +

Factor graph with utilities for hybrid factors. │ │ │ +More...

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

│ │ │ -Classes

class  gtsam::HybridValues
 HybridValues represents a collection of DiscreteValues and VectorValues. More...
 
struct  gtsam::traits< HybridValues >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
Jul 28, 2022
│ │ │ -
Author
Shangjie Xue
│ │ │ +

Factor graph with utilities for hybrid factors.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
January, 2023
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ -HybridValues.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_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -  _H_y_b_r_i_d_V_a_l_u_e_s represents a collection of _D_i_s_c_r_e_t_e_V_a_l_u_e_s and │ │ │ │ - _V_e_c_t_o_r_V_a_l_u_e_s. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_V_a_l_u_e_s_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridFactorGraph.cpp File Reference │ │ │ │ +Factor graph with utilities for hybrid factors. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Jul 28, 2022 │ │ │ │ +Factor graph with utilities for hybrid factors. │ │ │ │ Author │ │ │ │ - Shangjie Xue │ │ │ │ + Varun Agrawal │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + January, 2023 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_V_a_l_u_e_s_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00488.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianISAM.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,42 +96,51 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
HybridSmoother.h File Reference
│ │ │ +
HybridGaussianISAM.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

An incremental smoother for hybrid factor graphs. │ │ │ -More...

│ │ │ - │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridSmoother
class  gtsam::HybridGaussianISAM
 
struct  gtsam::traits< HybridGaussianISAM >
 traits More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

An incremental smoother for hybrid factor graphs.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
Date
October 2022
│ │ │ +
Date
March 31, 2022
│ │ │ +
Author
Fan Jiang
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │ +
Date
March 31, 2022
│ │ │ +
Author
Fan Jiang
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +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 │ │ │ │ -HybridSmoother.h File Reference │ │ │ │ -An incremental smoother for hybrid factor graphs. _M_o_r_e_._._. │ │ │ │ +HybridGaussianISAM.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_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_ _> │ │ │ │ +  traits _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -An incremental smoother for hybrid factor graphs. │ │ │ │ + Date │ │ │ │ + March 31, 2022 │ │ │ │ Author │ │ │ │ + Fan Jiang │ │ │ │ + Frank Dellaert │ │ │ │ Varun Agrawal │ │ │ │ Date │ │ │ │ - October 2022 │ │ │ │ + March 31, 2022 │ │ │ │ + Author │ │ │ │ + Fan Jiang │ │ │ │ + Frank Dellaert │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_S_m_o_o_t_h_e_r_._h │ │ │ │ + * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._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/a00488.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00488 = [ │ │ │ │ - ["gtsam::HybridSmoother", "a03500.html", "a03500"] │ │ │ │ + ["gtsam::traits< HybridGaussianISAM >", "a03472.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00488_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianISAM.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,73 +98,91 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridSmoother.h
│ │ │ +
HybridGaussianISAM.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
│ │ │ -
23namespace gtsam {
│ │ │ -
24
│ │ │ -
│ │ │ - │ │ │ -
26 private:
│ │ │ -
27 HybridBayesNet hybridBayesNet_;
│ │ │ -
28 HybridGaussianFactorGraph remainingFactorGraph_;
│ │ │ -
29
│ │ │ -
30 public:
│ │ │ -
50 void update(HybridGaussianFactorGraph graph, const Ordering& ordering,
│ │ │ -
51 boost::optional<size_t> maxNrLeaves = boost::none);
│ │ │ -
52
│ │ │ -
53 Ordering getOrdering(const HybridGaussianFactorGraph& newFactors);
│ │ │ -
54
│ │ │ -
64 std::pair<HybridGaussianFactorGraph, HybridBayesNet> addConditionals(
│ │ │ -
65 const HybridGaussianFactorGraph& graph,
│ │ │ -
66 const HybridBayesNet& hybridBayesNet, const Ordering& ordering) const;
│ │ │ -
67
│ │ │ -
69 GaussianMixture::shared_ptr gaussianMixture(size_t index) const;
│ │ │ -
70
│ │ │ -
72 const HybridBayesNet& hybridBayesNet() const;
│ │ │ -
73};
│ │ │ -
│ │ │ -
74
│ │ │ -
75}; // namespace gtsam
│ │ │ - │ │ │ -
Linearized Hybrid factor graph that uses type erasure.
│ │ │ -
A Bayes net of Gaussian Conditionals indexed by discrete keys.
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ +
22#include <gtsam/base/Testable.h>
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27namespace gtsam {
│ │ │ +
28
│ │ │ +
│ │ │ +
34class GTSAM_EXPORT HybridGaussianISAM : public ISAM<HybridBayesTree> {
│ │ │ +
35 public:
│ │ │ + │ │ │ + │ │ │ +
38 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
39
│ │ │ +
42
│ │ │ + │ │ │ +
45
│ │ │ +
47 HybridGaussianISAM(const HybridBayesTree& bayesTree);
│ │ │ +
48
│ │ │ +
50
│ │ │ +
51 private:
│ │ │ +
53 void updateInternal(
│ │ │ +
54 const HybridGaussianFactorGraph& newFactors,
│ │ │ +
55 HybridBayesTree::Cliques* orphans,
│ │ │ +
56 const boost::optional<size_t>& maxNrLeaves = boost::none,
│ │ │ +
57 const boost::optional<Ordering>& ordering = boost::none,
│ │ │ +
58 const HybridBayesTree::Eliminate& function =
│ │ │ +
59 HybridBayesTree::EliminationTraitsType::DefaultEliminate);
│ │ │ +
60
│ │ │ +
61 public:
│ │ │ +
70 void update(const HybridGaussianFactorGraph& newFactors,
│ │ │ +
71 const boost::optional<size_t>& maxNrLeaves = boost::none,
│ │ │ +
72 const boost::optional<Ordering>& ordering = boost::none,
│ │ │ +
73 const HybridBayesTree::Eliminate& function =
│ │ │ +
74 HybridBayesTree::EliminationTraitsType::DefaultEliminate);
│ │ │ +
75
│ │ │ +
84 static Ordering GetOrdering(HybridGaussianFactorGraph& factors,
│ │ │ +
85 const HybridGaussianFactorGraph& newFactors);
│ │ │ +
86};
│ │ │ +
│ │ │ +
87
│ │ │ +
89template <>
│ │ │ +
90struct traits<HybridGaussianISAM> : public Testable<HybridGaussianISAM> {};
│ │ │ +
91
│ │ │ +
92} // namespace gtsam
│ │ │ +
Concept check for values that can be used in unit tests.
│ │ │ +
Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.
│ │ │ +
Linearized Hybrid factor graph that uses type erasure.
│ │ │ +
Incremental update functionality (iSAM) for BayesTree.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals,...
Definition HybridBayesNet.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 Bayes tree representing a Hybrid density.
Definition HybridBayesTree.h:64
│ │ │
Definition HybridGaussianFactorGraph.h:102
│ │ │ -
Definition HybridSmoother.h:25
│ │ │ -
GaussianMixture::shared_ptr gaussianMixture(size_t index) const
Get the Gaussian Mixture from the Bayes Net posterior at index.
Definition HybridSmoother.cpp:131
│ │ │ -
void update(HybridGaussianFactorGraph graph, const Ordering &ordering, boost::optional< size_t > maxNrLeaves=boost::none)
Given new factors, perform an incremental update.
Definition HybridSmoother.cpp:58
│ │ │ -
std::pair< HybridGaussianFactorGraph, HybridBayesNet > addConditionals(const HybridGaussianFactorGraph &graph, const HybridBayesNet &hybridBayesNet, const Ordering &ordering) const
Add conditionals from previous timestep as part of liquefication.
Definition HybridSmoother.cpp:85
│ │ │ -
const HybridBayesNet & hybridBayesNet() const
Return the Bayes Net posterior.
Definition HybridSmoother.cpp:137
│ │ │ +
Definition HybridGaussianISAM.h:34
│ │ │ +
A Bayes tree with an update methods that implements the iSAM algorithm.
Definition ISAM.h:31
│ │ │
Definition Ordering.h:34
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,88 +1,99 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridSmoother.h │ │ │ │ +HybridGaussianISAM.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_/_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> │ │ │ │ -20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -22 │ │ │ │ -23namespace _g_t_s_a_m { │ │ │ │ -24 │ │ │ │ -_2_5class _H_y_b_r_i_d_S_m_o_o_t_h_e_r { │ │ │ │ -26 private: │ │ │ │ -27 _H_y_b_r_i_d_B_a_y_e_s_N_e_t hybridBayesNet_; │ │ │ │ -28 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h remainingFactorGraph_; │ │ │ │ -29 │ │ │ │ -30 public: │ │ │ │ -50 void _u_p_d_a_t_e(_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h graph, const _O_r_d_e_r_i_n_g& ordering, │ │ │ │ -51 boost::optional maxNrLeaves = boost::none); │ │ │ │ -52 │ │ │ │ -53 _O_r_d_e_r_i_n_g getOrdering(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& newFactors); │ │ │ │ -54 │ │ │ │ -64 std::pair _a_d_d_C_o_n_d_i_t_i_o_n_a_l_s( │ │ │ │ -65 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& graph, │ │ │ │ -66 const _H_y_b_r_i_d_B_a_y_e_s_N_e_t& _h_y_b_r_i_d_B_a_y_e_s_N_e_t, const _O_r_d_e_r_i_n_g& ordering) const; │ │ │ │ -67 │ │ │ │ -69 GaussianMixture::shared_ptr _g_a_u_s_s_i_a_n_M_i_x_t_u_r_e(size_t index) const; │ │ │ │ -70 │ │ │ │ -72 const _H_y_b_r_i_d_B_a_y_e_s_N_e_t& _h_y_b_r_i_d_B_a_y_e_s_N_e_t() const; │ │ │ │ -73}; │ │ │ │ -74 │ │ │ │ -75}; // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +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_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_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_/_I_S_A_M_._h> │ │ │ │ +26 │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ +28 │ │ │ │ +_3_4class GTSAM_EXPORT _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M : public _I_S_A_M { │ │ │ │ +35 public: │ │ │ │ +36 typedef _I_S_A_M_<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_> _B_a_s_e; │ │ │ │ +37 typedef _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M _T_h_i_s; │ │ │ │ +38 typedef boost::shared_ptr shared_ptr; │ │ │ │ +39 │ │ │ │ +42 │ │ │ │ +44 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M(); │ │ │ │ +45 │ │ │ │ +47 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M(const _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e& bayesTree); │ │ │ │ +48 │ │ │ │ +50 │ │ │ │ +51 private: │ │ │ │ +53 void updateInternal( │ │ │ │ +54 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& newFactors, │ │ │ │ +55 HybridBayesTree::Cliques* orphans, │ │ │ │ +56 const boost::optional& maxNrLeaves = boost::none, │ │ │ │ +57 const boost::optional& ordering = boost::none, │ │ │ │ +58 const HybridBayesTree::Eliminate& function = │ │ │ │ +59 HybridBayesTree::EliminationTraitsType::DefaultEliminate); │ │ │ │ +60 │ │ │ │ +61 public: │ │ │ │ +70 void update(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& newFactors, │ │ │ │ +71 const boost::optional& maxNrLeaves = boost::none, │ │ │ │ +72 const boost::optional& ordering = boost::none, │ │ │ │ +73 const HybridBayesTree::Eliminate& function = │ │ │ │ +74 HybridBayesTree::EliminationTraitsType::DefaultEliminate); │ │ │ │ +75 │ │ │ │ +84 static _O_r_d_e_r_i_n_g GetOrdering(_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& factors, │ │ │ │ +85 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& newFactors); │ │ │ │ +86}; │ │ │ │ +87 │ │ │ │ +89template <> │ │ │ │ +_9_0struct _t_r_a_i_t_s<_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +91 │ │ │ │ +92} // namespace gtsam │ │ │ │ +_T_e_s_t_a_b_l_e_._h │ │ │ │ +Concept check for values that can be used in unit tests. │ │ │ │ +_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ Linearized Hybrid factor graph that uses type erasure. │ │ │ │ -_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ -A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ +_I_S_A_M_._h │ │ │ │ +Incremental update functionality (iSAM) for BayesTree. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ -A hybrid Bayes net is a collection of HybridConditionals, which can have │ │ │ │ -discrete conditionals,... │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.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_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ +A Bayes tree representing a Hybrid density. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:64 │ │ │ │ _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ DDeeffiinniittiioonn HybridGaussianFactorGraph.h:102 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r │ │ │ │ -DDeeffiinniittiioonn HybridSmoother.h:25 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_g_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ -GaussianMixture::shared_ptr gaussianMixture(size_t index) const │ │ │ │ -Get the Gaussian Mixture from the Bayes Net posterior at index. │ │ │ │ -DDeeffiinniittiioonn HybridSmoother.cpp:131 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_u_p_d_a_t_e │ │ │ │ -void update(HybridGaussianFactorGraph graph, const Ordering &ordering, boost:: │ │ │ │ -optional< size_t > maxNrLeaves=boost::none) │ │ │ │ -Given new factors, perform an incremental update. │ │ │ │ -DDeeffiinniittiioonn HybridSmoother.cpp:58 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_a_d_d_C_o_n_d_i_t_i_o_n_a_l_s │ │ │ │ -std::pair< HybridGaussianFactorGraph, HybridBayesNet > addConditionals(const │ │ │ │ -HybridGaussianFactorGraph &graph, const HybridBayesNet &hybridBayesNet, const │ │ │ │ -Ordering &ordering) const │ │ │ │ -Add conditionals from previous timestep as part of liquefication. │ │ │ │ -DDeeffiinniittiioonn HybridSmoother.cpp:85 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_h_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ -const HybridBayesNet & hybridBayesNet() const │ │ │ │ -Return the Bayes Net posterior. │ │ │ │ -DDeeffiinniittiioonn HybridSmoother.cpp:137 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M │ │ │ │ +DDeeffiinniittiioonn HybridGaussianISAM.h:34 │ │ │ │ +_g_t_s_a_m_:_:_I_S_A_M │ │ │ │ +A Bayes tree with an update methods that implements the iSAM algorithm. │ │ │ │ +DDeeffiinniittiioonn ISAM.h:31 │ │ │ │ _g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_S_m_o_o_t_h_e_r_._h │ │ │ │ + * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._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/a00491.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearFactorGraph.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,35 +95,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
HybridSmoother.cpp File Reference
│ │ │ +
HybridNonlinearFactorGraph.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

An incremental smoother for hybrid factor graphs. │ │ │ +

Nonlinear hybrid factor graph that uses type erasure. │ │ │ More...

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

An incremental smoother for hybrid factor graphs.

│ │ │ +

Nonlinear hybrid factor graph that uses type erasure.

│ │ │
Author
Varun Agrawal
│ │ │ -
Date
October 2022
│ │ │ +
Date
May 28, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridSmoother.cpp File Reference │ │ │ │ -An incremental smoother for hybrid factor graphs. _M_o_r_e_._._. │ │ │ │ +HybridNonlinearFactorGraph.cpp File Reference │ │ │ │ +Nonlinear hybrid factor graph that uses type erasure. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -An incremental smoother for hybrid factor graphs. │ │ │ │ +Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ Author │ │ │ │ Varun Agrawal │ │ │ │ Date │ │ │ │ - October 2022 │ │ │ │ + May 28, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_S_m_o_o_t_h_e_r_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_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/a00494.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,39 +96,52 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
HybridNonlinearISAM.h File Reference
│ │ │ +
HybridBayesTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ +More...

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridNonlinearISAM
 Wrapper class to manage ISAM in a nonlinear context. More...
class  gtsam::HybridBayesTreeClique
 A clique in a HybridBayesTree which is a HybridConditional internally. More...
 
class  gtsam::HybridBayesTree
 A Bayes tree representing a Hybrid density. More...
 
struct  gtsam::traits< HybridBayesTree >
 traits More...
 
class  gtsam::BayesTreeOrphanWrapper< HybridBayesTreeClique >
 Class for Hybrid Bayes tree orphan subtrees. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
Sep 12, 2022
│ │ │ -
Author
Varun Agrawal
│ │ │ +

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.

│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,37 @@ │ │ │ │ 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 │ │ │ │ -HybridNonlinearISAM.h File Reference │ │ │ │ +HybridBayesTree.h File Reference │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. _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_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ -  Wrapper class to manage _I_S_A_M in a nonlinear context. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +  A clique in a _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e which is a _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l internally. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ +  A Bayes tree representing a Hybrid density. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_ _> │ │ │ │ +  traits _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_ _> │ │ │ │ +  Class for Hybrid Bayes tree orphan subtrees. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ Date │ │ │ │ - Sep 12, 2022 │ │ │ │ + Mar 11, 2022 │ │ │ │ Author │ │ │ │ - Varun Agrawal │ │ │ │ + Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00494.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ var a00494 = [ │ │ │ │ - ["gtsam::HybridNonlinearISAM", "a03496.html", "a03496"] │ │ │ │ + ["gtsam::HybridBayesTree", "a03424.html", "a03424"], │ │ │ │ + ["gtsam::traits< HybridBayesTree >", "a03428.html", null], │ │ │ │ + ["gtsam::BayesTreeOrphanWrapper< HybridBayesTreeClique >", "a03432.html", "a03432"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00494_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,139 +98,164 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridNonlinearISAM.h
│ │ │ +
HybridBayesTree.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
│ │ │ - │ │ │ - │ │ │ -
22
│ │ │ -
23namespace gtsam {
│ │ │ -
│ │ │ -
27class GTSAM_EXPORT HybridNonlinearISAM {
│ │ │ -
28 protected:
│ │ │ - │ │ │ -
31
│ │ │ - │ │ │ -
34
│ │ │ - │ │ │ -
37
│ │ │ - │ │ │ -
40
│ │ │ - │ │ │ -
43 int reorderCounter_;
│ │ │ -
44
│ │ │ - │ │ │ -
47
│ │ │ -
48 public:
│ │ │ -
51
│ │ │ -
│ │ │ - │ │ │ -
60 int reorderInterval = 1,
│ │ │ -
61 const HybridGaussianFactorGraph::Eliminate& eliminationFunction =
│ │ │ -
62 HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
│ │ │ -
63 : reorderInterval_(reorderInterval),
│ │ │ -
64 reorderCounter_(0),
│ │ │ -
65 eliminationFunction_(eliminationFunction) {}
│ │ │ -
│ │ │ -
66
│ │ │ -
70
│ │ │ -
72 Values estimate();
│ │ │ -
73
│ │ │ -
74 // /** find the marginal covariance for a single variable */
│ │ │ -
75 // Matrix marginalCovariance(Key key) const;
│ │ │ +
20#pragma once
│ │ │ +
21
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
28
│ │ │ +
29#include <string>
│ │ │ +
30
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ +
33// Forward declarations
│ │ │ +
34class HybridConditional;
│ │ │ +
35class VectorValues;
│ │ │ +
36
│ │ │ +
37/* ************************************************************************* */
│ │ │ +
│ │ │ +
44class GTSAM_EXPORT HybridBayesTreeClique
│ │ │ +
45 : public BayesTreeCliqueBase<HybridBayesTreeClique,
│ │ │ +
46 HybridGaussianFactorGraph> {
│ │ │ +
47 public:
│ │ │ + │ │ │ + │ │ │ +
50 Base;
│ │ │ +
51 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
52 typedef boost::weak_ptr<This> weak_ptr;
│ │ │ + │ │ │ +
54 HybridBayesTreeClique(const boost::shared_ptr<HybridConditional>& conditional)
│ │ │ +
55 : Base(conditional) {}
│ │ │ +
57 HybridBayesTreeClique(const HybridBayesTreeClique& clique) : Base(clique) {}
│ │ │ +
58
│ │ │ +
59 virtual ~HybridBayesTreeClique() {}
│ │ │ +
60};
│ │ │ +
│ │ │ +
61
│ │ │ +
62/* ************************************************************************* */
│ │ │ +
│ │ │ +
64class GTSAM_EXPORT HybridBayesTree : public BayesTree<HybridBayesTreeClique> {
│ │ │ +
65 private:
│ │ │ + │ │ │ +
67
│ │ │ +
68 public:
│ │ │ +
69 typedef HybridBayesTree This;
│ │ │ +
70 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
71
│ │ │ +
74
│ │ │ +
75 HybridBayesTree() = default;
│ │ │
76
│ │ │ -
77 // access
│ │ │ -
78
│ │ │ -
80 const HybridGaussianISAM& bayesTree() const { return isam_; }
│ │ │ -
81
│ │ │ -
87 void prune(const size_t maxNumberLeaves) { isam_.prune(maxNumberLeaves); }
│ │ │ +
78 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ +
79
│ │ │ +
87 GaussianBayesTree choose(const DiscreteValues& assignment) const;
│ │ │
88
│ │ │ -
90 const Values& getLinearizationPoint() const { return linPoint_; }
│ │ │ -
91
│ │ │ -
93 const DiscreteValues& assignment() const { return assignment_; }
│ │ │ -
94
│ │ │ -
│ │ │ - │ │ │ -
97 return factors_;
│ │ │ -
98 }
│ │ │ -
│ │ │ -
99
│ │ │ -
101 int reorderInterval() const { return reorderInterval_; }
│ │ │ -
│ │ │ -
102 int reorderCounter() const { return reorderCounter_; }
│ │ │ -
103
│ │ │ -
105 void print(const std::string& s = "",
│ │ │ -
106 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ -
107
│ │ │ -
109 void printStats() const;
│ │ │ -
110
│ │ │ -
112 void saveGraph(const std::string& s,
│ │ │ -
113 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ -
114
│ │ │ -
118
│ │ │ -
120 void update(const HybridNonlinearFactorGraph& newFactors,
│ │ │ -
121 const Values& initialValues,
│ │ │ -
122 const boost::optional<size_t>& maxNrLeaves = boost::none,
│ │ │ -
123 const boost::optional<Ordering>& ordering = boost::none);
│ │ │ -
124
│ │ │ -
126 void reorder_relinearize();
│ │ │ -
127
│ │ │ -
129};
│ │ │ -
130
│ │ │ -
131} // namespace gtsam
│ │ │ -
│ │ │ +
96 HybridValues optimize() const;
│ │ │ +
97
│ │ │ +
105 VectorValues optimize(const DiscreteValues& assignment) const;
│ │ │ +
106
│ │ │ +
112 void prune(const size_t maxNumberLeaves);
│ │ │ +
113
│ │ │ +
115
│ │ │ +
116 private:
│ │ │ +
118 friend class boost::serialization::access;
│ │ │ +
119 template <class ARCHIVE>
│ │ │ +
120 void serialize(ARCHIVE& ar, const unsigned int /*version*/) {
│ │ │ +
121 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
122 }
│ │ │ +
123};
│ │ │
│ │ │ -
Nonlinear hybrid factor graph that uses type erasure.
│ │ │ - │ │ │ +
124
│ │ │ +
126template <>
│ │ │ +
127struct traits<HybridBayesTree> : public Testable<HybridBayesTree> {};
│ │ │ +
128
│ │ │ +
139template <>
│ │ │ +
│ │ │ + │ │ │ +
141 public:
│ │ │ + │ │ │ +
143 typedef HybridConditional Base;
│ │ │ +
144
│ │ │ +
145 boost::shared_ptr<CliqueType> clique;
│ │ │ +
146
│ │ │ +
│ │ │ +
152 BayesTreeOrphanWrapper(const boost::shared_ptr<CliqueType>& clique)
│ │ │ +
153 : clique(clique) {
│ │ │ +
154 // Store parent keys in our base type factor so that eliminating those
│ │ │ +
155 // parent keys will pull this subtree into the elimination.
│ │ │ +
156 this->keys_.assign(clique->conditional()->beginParents(),
│ │ │ +
157 clique->conditional()->endParents());
│ │ │ +
158 this->discreteKeys_.assign(clique->conditional()->discreteKeys().begin(),
│ │ │ +
159 clique->conditional()->discreteKeys().end());
│ │ │ +
160 }
│ │ │ +
│ │ │ +
161
│ │ │ +
│ │ │ +
163 void print(
│ │ │ +
164 const std::string& s = "",
│ │ │ +
165 const KeyFormatter& formatter = DefaultKeyFormatter) const override {
│ │ │ +
166 clique->print(s + "stored clique", formatter);
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168};
│ │ │ +
│ │ │ +
169
│ │ │ +
170} // namespace gtsam
│ │ │ +
A Bayes net of Gaussian Conditionals indexed by discrete keys.
│ │ │ +
Linearized Hybrid factor graph that uses type erasure.
│ │ │ +
Bayes Tree is a tree of cliques of a Bayes Chain.
│ │ │ +
Base class for cliques of a BayesTree.
│ │ │ +
Base class for conditional densities.
│ │ │ +
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.
│ │ │
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
│ │ │ +
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │
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
│ │ │
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ -
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridBayesTree.cpp:175
│ │ │ -
Definition HybridGaussianISAM.h:34
│ │ │ -
Definition HybridNonlinearFactorGraph.h:33
│ │ │ -
Wrapper class to manage ISAM in a nonlinear context.
Definition HybridNonlinearISAM.h:27
│ │ │ -
const HybridNonlinearFactorGraph & getFactorsUnsafe() const
get underlying nonlinear graph
Definition HybridNonlinearISAM.h:96
│ │ │ -
DiscreteValues assignment_
The discrete assignment.
Definition HybridNonlinearISAM.h:36
│ │ │ -
const Values & getLinearizationPoint() const
Return the current linearization point.
Definition HybridNonlinearISAM.h:90
│ │ │ -
HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph::Eliminate &eliminationFunction=HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
Periodically reorder and relinearize.
Definition HybridNonlinearISAM.h:59
│ │ │ -
HybridNonlinearFactorGraph factors_
The original factors, used when relinearizing.
Definition HybridNonlinearISAM.h:39
│ │ │ -
const DiscreteValues & assignment() const
Return the current discrete assignment.
Definition HybridNonlinearISAM.h:93
│ │ │ -
int reorderCounter() const
TODO: comment.
Definition HybridNonlinearISAM.h:102
│ │ │ -
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridNonlinearISAM.h:87
│ │ │ -
int reorderInterval_
The reordering interval and counter.
Definition HybridNonlinearISAM.h:42
│ │ │ -
int reorderInterval() const
get counters
Definition HybridNonlinearISAM.h:101
│ │ │ -
Values linPoint_
The current linearization point.
Definition HybridNonlinearISAM.h:33
│ │ │ -
gtsam::HybridGaussianISAM isam_
The internal iSAM object.
Definition HybridNonlinearISAM.h:30
│ │ │ -
HybridGaussianFactorGraph::Eliminate eliminationFunction_
The elimination function.
Definition HybridNonlinearISAM.h:46
│ │ │ -
const HybridGaussianISAM & bayesTree() const
access the underlying bayes tree
Definition HybridNonlinearISAM.h:80
│ │ │ -
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
Definition EliminateableFactorGraph.h:89
│ │ │ -
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
│ │ │ +
A clique in a HybridBayesTree which is a HybridConditional internally.
Definition HybridBayesTree.h:46
│ │ │ +
HybridBayesTreeClique(const boost::shared_ptr< HybridConditional > &conditional)
Copy constructor.
Definition HybridBayesTree.h:54
│ │ │ +
A Bayes tree representing a Hybrid density.
Definition HybridBayesTree.h:64
│ │ │ +
HybridBayesTree()=default
Default constructor, creates an empty Bayes tree.
│ │ │ +
BayesTreeOrphanWrapper(const boost::shared_ptr< CliqueType > &clique)
Construct a new Bayes Tree Orphan Wrapper object.
Definition HybridBayesTree.h:152
│ │ │ +
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print utility
Definition HybridBayesTree.h:163
│ │ │ +
Hybrid Conditional Density.
Definition HybridConditional.h:62
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
Bayes tree.
Definition BayesTree.h:67
│ │ │ +
Definition BayesTree.h:276
│ │ │ +
This is the base class for BayesTree cliques.
Definition BayesTreeCliqueBase.h:50
│ │ │ +
A Bayes tree representing a Gaussian density.
Definition GaussianBayesTree.h:52
│ │ │ +
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
The Factor::error simply extracts the.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,191 +1,208 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridNonlinearISAM.h │ │ │ │ +HybridBayesTree.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_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -22 │ │ │ │ -23namespace _g_t_s_a_m { │ │ │ │ -_2_7class GTSAM_EXPORT _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M { │ │ │ │ -28 protected: │ │ │ │ -_3_0 _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M _i_s_a_m__; │ │ │ │ -31 │ │ │ │ -_3_3 _V_a_l_u_e_s _l_i_n_P_o_i_n_t__; │ │ │ │ -34 │ │ │ │ -_3_6 _D_i_s_c_r_e_t_e_V_a_l_u_e_s _a_s_s_i_g_n_m_e_n_t__; │ │ │ │ -37 │ │ │ │ -_3_9 _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h _f_a_c_t_o_r_s__; │ │ │ │ -40 │ │ │ │ -_4_2 int _r_e_o_r_d_e_r_I_n_t_e_r_v_a_l__; │ │ │ │ -43 int reorderCounter_; │ │ │ │ -44 │ │ │ │ -_4_6 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_E_l_i_m_i_n_a_t_e _e_l_i_m_i_n_a_t_i_o_n_F_u_n_c_t_i_o_n__; │ │ │ │ -47 │ │ │ │ -48 public: │ │ │ │ -51 │ │ │ │ -_5_9 _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M( │ │ │ │ -60 int reorderInterval = 1, │ │ │ │ -61 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_E_l_i_m_i_n_a_t_e& eliminationFunction = │ │ │ │ -62 HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate) │ │ │ │ -63 : reorderInterval_(reorderInterval), │ │ │ │ -64 reorderCounter_(0), │ │ │ │ -65 eliminationFunction_(eliminationFunction) {} │ │ │ │ -66 │ │ │ │ -70 │ │ │ │ -72 _V_a_l_u_e_s estimate(); │ │ │ │ -73 │ │ │ │ -74 // /** find the marginal covariance for a single variable */ │ │ │ │ -75 // Matrix marginalCovariance(Key key) const; │ │ │ │ +20#pragma once │ │ │ │ +21 │ │ │ │ +22#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +24#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> │ │ │ │ +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_C_l_i_q_u_e_B_a_s_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_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +28 │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +33// Forward declarations │ │ │ │ +34class HybridConditional; │ │ │ │ +35class _V_e_c_t_o_r_V_a_l_u_e_s; │ │ │ │ +36 │ │ │ │ +37/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +_4_4class GTSAM_EXPORT _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +45 : public _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e { │ │ │ │ +47 public: │ │ │ │ +48 typedef _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e _T_h_i_s; │ │ │ │ +49 typedef _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_B_a_s_e_<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_, │ │ │ │ +_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ +50 _B_a_s_e; │ │ │ │ +51 typedef boost::shared_ptr shared_ptr; │ │ │ │ +52 typedef boost::weak_ptr weak_ptr; │ │ │ │ +53 _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e() {} │ │ │ │ +_5_4 _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e(const boost::shared_ptr& │ │ │ │ +conditional) │ │ │ │ +55 : _B_a_s_e(conditional) {} │ │ │ │ +57 _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e(const _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e& clique) : Base(clique) {} │ │ │ │ +58 │ │ │ │ +59 virtual ~HybridBayesTreeClique() {} │ │ │ │ +60}; │ │ │ │ +61 │ │ │ │ +62/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +_6_4class GTSAM_EXPORT _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e : public _B_a_y_e_s_T_r_e_e │ │ │ │ +{ │ │ │ │ +65 private: │ │ │ │ +66 typedef _B_a_y_e_s_T_r_e_e_<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_> _B_a_s_e; │ │ │ │ +67 │ │ │ │ +68 public: │ │ │ │ +69 typedef _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e _T_h_i_s; │ │ │ │ +70 typedef boost::shared_ptr shared_ptr; │ │ │ │ +71 │ │ │ │ +74 │ │ │ │ +_7_5 _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e() = default; │ │ │ │ 76 │ │ │ │ -77 // access │ │ │ │ -78 │ │ │ │ -_8_0 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M& _b_a_y_e_s_T_r_e_e() const { return isam_; } │ │ │ │ -81 │ │ │ │ -_8_7 void _p_r_u_n_e(const size_t maxNumberLeaves) { isam_._p_r_u_n_e(maxNumberLeaves); } │ │ │ │ +78 bool _e_q_u_a_l_s(const _T_h_i_s& other, double tol = 1e-9) const; │ │ │ │ +79 │ │ │ │ +87 _G_a_u_s_s_i_a_n_B_a_y_e_s_T_r_e_e choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& assignment) const; │ │ │ │ 88 │ │ │ │ -_9_0 const _V_a_l_u_e_s& _g_e_t_L_i_n_e_a_r_i_z_a_t_i_o_n_P_o_i_n_t() const { return linPoint_; } │ │ │ │ -91 │ │ │ │ -_9_3 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& _a_s_s_i_g_n_m_e_n_t() const { return assignment_; } │ │ │ │ -94 │ │ │ │ -_9_6 const _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h& _g_e_t_F_a_c_t_o_r_s_U_n_s_a_f_e() const { │ │ │ │ -97 return factors_; │ │ │ │ -98 } │ │ │ │ -99 │ │ │ │ -_1_0_1 int _r_e_o_r_d_e_r_I_n_t_e_r_v_a_l() const { return reorderInterval_; } │ │ │ │ -_1_0_2 int _r_e_o_r_d_e_r_C_o_u_n_t_e_r() const { return reorderCounter_; } │ │ │ │ -103 │ │ │ │ -105 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ -106 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ -107 │ │ │ │ -109 void printStats() const; │ │ │ │ -110 │ │ │ │ -112 void saveGraph(const std::string& s, │ │ │ │ -113 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ -114 │ │ │ │ -118 │ │ │ │ -120 void update(const _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h& newFactors, │ │ │ │ -121 const _V_a_l_u_e_s& initialValues, │ │ │ │ -122 const boost::optional& maxNrLeaves = boost::none, │ │ │ │ -123 const boost::optional& ordering = boost::none); │ │ │ │ +96 _H_y_b_r_i_d_V_a_l_u_e_s _o_p_t_i_m_i_z_e() const; │ │ │ │ +97 │ │ │ │ +105 _V_e_c_t_o_r_V_a_l_u_e_s _o_p_t_i_m_i_z_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& assignment) const; │ │ │ │ +106 │ │ │ │ +112 void prune(const size_t maxNumberLeaves); │ │ │ │ +113 │ │ │ │ +115 │ │ │ │ +116 private: │ │ │ │ +_1_1_8 friend class boost::serialization::access; │ │ │ │ +119 template │ │ │ │ +120 void serialize(ARCHIVE& ar, const unsigned int /*version*/) { │ │ │ │ +121 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ +122 } │ │ │ │ +123}; │ │ │ │ 124 │ │ │ │ -126 void reorder_relinearize(); │ │ │ │ -127 │ │ │ │ -129}; │ │ │ │ -130 │ │ │ │ -131} // namespace gtsam │ │ │ │ -_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ -_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._h │ │ │ │ +126template <> │ │ │ │ +_1_2_7struct _t_r_a_i_t_s<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +128 │ │ │ │ +139template <> │ │ │ │ +_1_4_0class _B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e> : public │ │ │ │ +_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ +141 public: │ │ │ │ +142 typedef _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e _C_l_i_q_u_e_T_y_p_e; │ │ │ │ +143 typedef _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l _B_a_s_e; │ │ │ │ +144 │ │ │ │ +145 boost::shared_ptr clique; │ │ │ │ +146 │ │ │ │ +_1_5_2 _B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r(const boost::shared_ptr& clique) │ │ │ │ +153 : clique(clique) { │ │ │ │ +154 // Store parent keys in our base type factor so that eliminating those │ │ │ │ +155 // parent keys will pull this subtree into the elimination. │ │ │ │ +156 this->keys_.assign(clique->conditional()->beginParents(), │ │ │ │ +157 clique->conditional()->endParents()); │ │ │ │ +158 this->discreteKeys_.assign(clique->conditional()->discreteKeys().begin(), │ │ │ │ +159 clique->conditional()->discreteKeys().end()); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +_1_6_3 void _p_r_i_n_t( │ │ │ │ +164 const std::string& s = "", │ │ │ │ +165 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override { │ │ │ │ +166 clique->print(s + "stored clique", formatter); │ │ │ │ +167 } │ │ │ │ +168}; │ │ │ │ +169 │ │ │ │ +170} // namespace gtsam │ │ │ │ +_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ +A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ +_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Linearized Hybrid factor graph that uses type erasure. │ │ │ │ +_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ +_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. │ │ │ │ +_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +Base class for conditional densities. │ │ │ │ +_G_a_u_s_s_i_a_n_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree. │ │ │ │ _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_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_:_:_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_:_:_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_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_:_:_p_r_u_n_e │ │ │ │ -void prune(const size_t maxNumberLeaves) │ │ │ │ -Prune the underlying Bayes tree. │ │ │ │ -DDeeffiinniittiioonn HybridBayesTree.cpp:175 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M │ │ │ │ -DDeeffiinniittiioonn HybridGaussianISAM.h:34 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearFactorGraph.h:33 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ -Wrapper class to manage ISAM in a nonlinear context. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:27 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_g_e_t_F_a_c_t_o_r_s_U_n_s_a_f_e │ │ │ │ -const HybridNonlinearFactorGraph & getFactorsUnsafe() const │ │ │ │ -get underlying nonlinear graph │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:96 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_a_s_s_i_g_n_m_e_n_t__ │ │ │ │ -DiscreteValues assignment_ │ │ │ │ -The discrete assignment. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:36 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_g_e_t_L_i_n_e_a_r_i_z_a_t_i_o_n_P_o_i_n_t │ │ │ │ -const Values & getLinearizationPoint() const │ │ │ │ -Return the current linearization point. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:90 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ -HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph:: │ │ │ │ -Eliminate &eliminationFunction=HybridGaussianFactorGraph:: │ │ │ │ -EliminationTraitsType::DefaultEliminate) │ │ │ │ -Periodically reorder and relinearize. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:59 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_f_a_c_t_o_r_s__ │ │ │ │ -HybridNonlinearFactorGraph factors_ │ │ │ │ -The original factors, used when relinearizing. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:39 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_a_s_s_i_g_n_m_e_n_t │ │ │ │ -const DiscreteValues & assignment() const │ │ │ │ -Return the current discrete assignment. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:93 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_C_o_u_n_t_e_r │ │ │ │ -int reorderCounter() const │ │ │ │ -TODO: comment. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:102 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_p_r_u_n_e │ │ │ │ -void prune(const size_t maxNumberLeaves) │ │ │ │ -Prune the underlying Bayes tree. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:87 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_I_n_t_e_r_v_a_l__ │ │ │ │ -int reorderInterval_ │ │ │ │ -The reordering interval and counter. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:42 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_I_n_t_e_r_v_a_l │ │ │ │ -int reorderInterval() const │ │ │ │ -get counters │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:101 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_l_i_n_P_o_i_n_t__ │ │ │ │ -Values linPoint_ │ │ │ │ -The current linearization point. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:33 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_i_s_a_m__ │ │ │ │ -gtsam::HybridGaussianISAM isam_ │ │ │ │ -The internal iSAM object. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:30 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_e_l_i_m_i_n_a_t_i_o_n_F_u_n_c_t_i_o_n__ │ │ │ │ -HybridGaussianFactorGraph::Eliminate eliminationFunction_ │ │ │ │ -The elimination function. │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:46 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_b_a_y_e_s_T_r_e_e │ │ │ │ -const HybridGaussianISAM & bayesTree() const │ │ │ │ -access the underlying bayes tree │ │ │ │ -DDeeffiinniittiioonn HybridNonlinearISAM.h:80 │ │ │ │ -_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_E_l_i_m_i_n_a_t_e │ │ │ │ -std::function< EliminationResult(const FactorGraphType &, const Ordering &)> │ │ │ │ -Eliminate │ │ │ │ -The function type that does a single dense elimination step on a subgraph. │ │ │ │ -DDeeffiinniittiioonn EliminateableFactorGraph.h:89 │ │ │ │ -_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_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +A clique in a HybridBayesTree which is a HybridConditional internally. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:46 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ +HybridBayesTreeClique(const boost::shared_ptr< HybridConditional > │ │ │ │ +&conditional) │ │ │ │ +Copy constructor. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:54 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ +A Bayes tree representing a Hybrid density. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:64 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ +HybridBayesTree()=default │ │ │ │ +Default constructor, creates an empty Bayes tree. │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_ _>_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r │ │ │ │ +BayesTreeOrphanWrapper(const boost::shared_ptr< CliqueType > &clique) │ │ │ │ +Construct a new Bayes Tree Orphan Wrapper object. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:152 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_ _>_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="", const KeyFormatter │ │ │ │ +&formatter=DefaultKeyFormatter) const override │ │ │ │ +print utility │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:163 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +Hybrid Conditional Density. │ │ │ │ +DDeeffiinniittiioonn HybridConditional.h:62 │ │ │ │ +_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_:_:_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_O_r_p_h_a_n_W_r_a_p_p_e_r │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:276 │ │ │ │ +_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 │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_B_a_y_e_s_T_r_e_e │ │ │ │ +A Bayes tree representing a Gaussian density. │ │ │ │ +DDeeffiinniittiioonn GaussianBayesTree.h:52 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +VectorValues represents a collection of vector-valued variables associated each │ │ │ │ +with a unique integer... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +The Factor::error simply extracts the. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00497.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactorGraph.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,32 +94,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
HybridNonlinearISAM.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs
│ │ │ +
HybridFactorGraph.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Factor graph with utilities for hybrid factors. │ │ │ +More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::HybridFactorGraph
 Hybrid Factor Graph Factor graph with utilities for hybrid factors. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Typedefs

│ │ │ +using gtsam::SharedFactor = boost::shared_ptr< Factor >
 
│ │ │

Detailed Description

│ │ │ -
Date
Sep 12, 2022
│ │ │ -
Author
Varun Agrawal
│ │ │ +

Factor graph with utilities for hybrid factors.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
May 28, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,32 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridNonlinearISAM.cpp 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 │ │ │ │ +HybridFactorGraph.h File Reference │ │ │ │ +Factor graph with utilities for hybrid factors. _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_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +  Hybrid _F_a_c_t_o_r Graph _F_a_c_t_o_r graph with utilities for hybrid factors. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::SShhaarreeddFFaaccttoorr = boost::shared_ptr< _F_a_c_t_o_r > │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Sep 12, 2022 │ │ │ │ +Factor graph with utilities for hybrid factors. │ │ │ │ Author │ │ │ │ Varun Agrawal │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + May 28, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_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/a00500.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearFactorGraph.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,46 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
HybridNonlinearFactorGraph.h File Reference
│ │ │ +
HybridBayesTree.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Nonlinear hybrid factor graph that uses type erasure. │ │ │ +

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::HybridNonlinearFactorGraph
 
struct  gtsam::traits< HybridNonlinearFactorGraph >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Nonlinear hybrid factor graph that uses type erasure.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
Date
May 28, 2022
│ │ │ +

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.

│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang, Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +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 │ │ │ │ -HybridNonlinearFactorGraph.h File Reference │ │ │ │ -Nonlinear hybrid factor graph that uses type erasure. _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_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridBayesTree.cpp File Reference │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ - Author │ │ │ │ - Varun Agrawal │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ Date │ │ │ │ - May 28, 2022 │ │ │ │ + Mar 11, 2022 │ │ │ │ + Author │ │ │ │ + Fan Jiang, Varun Agrawal │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00503.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearFactorGraph.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixture.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,36 +94,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
HybridNonlinearFactorGraph.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
GaussianMixture.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Nonlinear hybrid factor graph that uses type erasure. │ │ │ +

A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::GaussianMixture
 A conditional of gaussian mixtures indexed by discrete variables, as part of a Bayes Network. More...
 
struct  gtsam::traits< GaussianMixture >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

│ │ │ +std::set< DiscreteKeygtsam::DiscreteKeysAsSet (const DiscreteKeys &discreteKeys)
 Return the DiscreteKey vector as a set.
 
│ │ │

Detailed Description

│ │ │ -

Nonlinear hybrid factor graph that uses type erasure.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
Date
May 28, 2022
│ │ │ +

A hybrid conditional in the Conditional Linear Gaussian scheme.

│ │ │ +
Author
Fan Jiang
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │ +
Date
Mar 12, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,36 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridNonlinearFactorGraph.cpp File Reference │ │ │ │ -Nonlinear hybrid factor graph that uses type erasure. _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 │ │ │ │ +GaussianMixture.h File Reference │ │ │ │ +A hybrid conditional in the Conditional Linear Gaussian scheme. _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_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ +  A conditional of gaussian mixtures indexed by discrete variables, as │ │ │ │ + part of a Bayes Network. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::set< _D_i_s_c_r_e_t_e_K_e_y >  ggttssaamm::::DDiissccrreetteeKKeeyyssAAssSSeett (const _D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ + &discreteKeys) │ │ │ │ +  Return the DiscreteKey vector as a set. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ +A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ │ Author │ │ │ │ + Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ Date │ │ │ │ - May 28, 2022 │ │ │ │ + Mar 12, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ + * _G_a_u_s_s_i_a_n_M_i_x_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/a00506.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridValues.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,39 +96,41 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
HybridJunctionTree.h File Reference
│ │ │ +
HybridValues.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridJunctionTree
 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...
class  gtsam::HybridValues
 HybridValues represents a collection of DiscreteValues and VectorValues. More...
 
struct  gtsam::traits< HybridValues >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ +
Date
Jul 28, 2022
│ │ │ +
Author
Shangjie Xue
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ -HybridJunctionTree.h File Reference │ │ │ │ +HybridValues.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_:_:_H_y_b_r_i_d_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_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +  _H_y_b_r_i_d_V_a_l_u_e_s represents a collection of _D_i_s_c_r_e_t_e_V_a_l_u_e_s and │ │ │ │ + _V_e_c_t_o_r_V_a_l_u_e_s. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_V_a_l_u_e_s_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - Mar 11, 2022 │ │ │ │ + Jul 28, 2022 │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ + Shangjie Xue │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00506_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridValues.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridJunctionTree.h
│ │ │ +
HybridValues.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,52 +114,254 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
18#pragma once
│ │ │
19
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
26// Forward declarations
│ │ │ -
27class HybridEliminationTree;
│ │ │ -
28
│ │ │ -
│ │ │ -
52class GTSAM_EXPORT HybridJunctionTree
│ │ │ -
53 : public JunctionTree<HybridBayesTree, HybridGaussianFactorGraph> {
│ │ │ -
54
│ │ │ -
55 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
59 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ -
60
│ │ │ -
70 HybridJunctionTree(const HybridEliminationTree& eliminationTree);
│ │ │ -
71};
│ │ │ -
│ │ │ -
72
│ │ │ -
73} // namespace gtsam
│ │ │ -
Linearized Hybrid factor graph that uses type erasure.
│ │ │ -
Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.
│ │ │ -
The junction tree.
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
23#include <gtsam/inference/Key.h>
│ │ │ + │ │ │ + │ │ │ +
26
│ │ │ +
27#include <map>
│ │ │ +
28#include <string>
│ │ │ +
29#include <vector>
│ │ │ +
30
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ +
│ │ │ +
38class GTSAM_EXPORT HybridValues {
│ │ │ +
39 private:
│ │ │ +
41 VectorValues continuous_;
│ │ │ +
42
│ │ │ +
44 DiscreteValues discrete_;
│ │ │ +
45
│ │ │ +
47 Values nonlinear_;
│ │ │ +
48
│ │ │ +
49 public:
│ │ │ +
52
│ │ │ +
54 HybridValues() = default;
│ │ │ +
55
│ │ │ +
│ │ │ + │ │ │ +
58 : continuous_(cv), discrete_(dv){};
│ │ │ +
│ │ │ +
59
│ │ │ +
│ │ │ + │ │ │ +
62 const Values& v)
│ │ │ +
63 : continuous_(cv), discrete_(dv), nonlinear_(v){};
│ │ │ +
│ │ │ +
64
│ │ │ +
68
│ │ │ +
│ │ │ +
70 void print(const std::string& s = "HybridValues",
│ │ │ +
71 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const {
│ │ │ +
72 std::cout << s << ": \n";
│ │ │ +
73 continuous_.print(" Continuous",
│ │ │ +
74 keyFormatter); // print continuous components
│ │ │ +
75 discrete_.print(" Discrete", keyFormatter); // print discrete components
│ │ │ +
76 };
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
79 bool equals(const HybridValues& other, double tol = 1e-9) const {
│ │ │ +
80 return continuous_.equals(other.continuous_, tol) &&
│ │ │ +
81 discrete_.equals(other.discrete_, tol);
│ │ │ +
82 }
│ │ │ +
│ │ │ +
83
│ │ │ +
87
│ │ │ +
89 const VectorValues& continuous() const { return continuous_; }
│ │ │ +
90
│ │ │ +
92 const DiscreteValues& discrete() const { return discrete_; }
│ │ │ +
93
│ │ │ +
95 const Values& nonlinear() const { return nonlinear_; }
│ │ │ +
96
│ │ │ +
98 bool existsVector(Key j) { return continuous_.exists(j); };
│ │ │ +
99
│ │ │ +
101 bool existsDiscrete(Key j) { return (discrete_.find(j) != discrete_.end()); };
│ │ │ +
102
│ │ │ +
│ │ │ + │ │ │ +
105 return nonlinear_.exists(j);
│ │ │ +
106 };
│ │ │ +
│ │ │ +
107
│ │ │ +
│ │ │ +
109 bool exists(Key j) {
│ │ │ +
110 return existsVector(j) || existsDiscrete(j) || existsNonlinear(j);
│ │ │ +
111 };
│ │ │ +
│ │ │ +
112
│ │ │ +
117 void insert(Key j, const Vector& value) { continuous_.insert(j, value); }
│ │ │ +
118
│ │ │ +
123 void insert(Key j, size_t value) { discrete_[j] = value; };
│ │ │ +
124
│ │ │ +
│ │ │ +
126 void insert_or_assign(Key j, const Vector& value) {
│ │ │ +
127 continuous_.insert_or_assign(j, value);
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
│ │ │ +
131 void insert_or_assign(Key j, size_t value) {
│ │ │ +
132 discrete_[j] = value;
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
│ │ │ + │ │ │ +
138 continuous_.insert(values);
│ │ │ +
139 return *this;
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
│ │ │ + │ │ │ +
145 discrete_.insert(values);
│ │ │ +
146 return *this;
│ │ │ +
147 }
│ │ │ +
│ │ │ +
148
│ │ │ +
│ │ │ +
151 HybridValues& insert(const Values& values) {
│ │ │ +
152 nonlinear_.insert(values);
│ │ │ +
153 return *this;
│ │ │ +
154 }
│ │ │ +
│ │ │ +
155
│ │ │ +
│ │ │ + │ │ │ +
159 continuous_.insert(values.continuous());
│ │ │ +
160 discrete_.insert(values.discrete());
│ │ │ +
161 nonlinear_.insert(values.nonlinear());
│ │ │ +
162 return *this;
│ │ │ +
163 }
│ │ │ +
│ │ │ +
164
│ │ │ +
169 Vector& at(Key j) { return continuous_.at(j); };
│ │ │ +
170
│ │ │ +
175 size_t& atDiscrete(Key j) { return discrete_.at(j); };
│ │ │ +
176
│ │ │ +
│ │ │ + │ │ │ +
182 continuous_.update(values);
│ │ │ +
183 return *this;
│ │ │ +
184 }
│ │ │ +
│ │ │ +
185
│ │ │ +
│ │ │ + │ │ │ +
191 discrete_.update(values);
│ │ │ +
192 return *this;
│ │ │ +
193 }
│ │ │ +
│ │ │ +
194
│ │ │ +
│ │ │ + │ │ │ +
200 continuous_.update(values.continuous());
│ │ │ +
201 discrete_.update(values.discrete());
│ │ │ +
202 return *this;
│ │ │ +
203 }
│ │ │ +
│ │ │ +
204
│ │ │ +
│ │ │ + │ │ │ +
207 VectorValues measurements;
│ │ │ +
208 for (const auto& key : keys) {
│ │ │ +
209 measurements.insert(key, continuous_.at(key));
│ │ │ +
210 }
│ │ │ +
211 return measurements;
│ │ │ +
212 }
│ │ │ +
│ │ │ +
213
│ │ │ +
217
│ │ │ +
│ │ │ +
224 std::string html(
│ │ │ +
225 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const {
│ │ │ +
226 std::stringstream ss;
│ │ │ +
227 ss << this->continuous_.html(keyFormatter);
│ │ │ +
228 ss << this->discrete_.html(keyFormatter);
│ │ │ +
229 return ss.str();
│ │ │ +
230 };
│ │ │ +
│ │ │ +
231
│ │ │ +
233};
│ │ │ +
│ │ │ +
234
│ │ │ +
235// traits
│ │ │ +
236template <>
│ │ │ +
237struct traits<HybridValues> : public Testable<HybridValues> {};
│ │ │ +
238
│ │ │ +
239} // namespace gtsam
│ │ │ +
An assignment from labels to a discrete value index (size_t)
│ │ │ +
specialized key for discrete variables
│ │ │ + │ │ │ + │ │ │ +
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
│ │ │ -
Elimination Tree type for Hybrid Factor Graphs.
Definition HybridEliminationTree.h:32
│ │ │ -
An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree,...
Definition HybridJunctionTree.h:53
│ │ │ -
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
Definition HybridJunctionTree.h:59
│ │ │ -
JunctionTree< HybridBayesTree, HybridGaussianFactorGraph > Base
Base class.
Definition HybridJunctionTree.h:57
│ │ │ -
HybridJunctionTree This
This class.
Definition HybridJunctionTree.h:58
│ │ │ -
A JunctionTree is a cluster tree, a set of variable clusters with factors, arranged in a tree,...
Definition JunctionTree.h:50
│ │ │ +
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │ +
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
│ │ │ +
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ +
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ +
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const Names &names={}) const
Output as a html table.
Definition DiscreteValues.cpp:104
│ │ │ +
DiscreteValues & update(const DiscreteValues &values)
For all key/value pairs in values, replace values with corresponding keys in this object with those i...
Definition DiscreteValues.cpp:63
│ │ │ +
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print required by Testable.
Definition DiscreteValues.cpp:31
│ │ │ +
bool equals(const DiscreteValues &x, double tol=1e-9) const
equals required by Testable for unit testing.
Definition DiscreteValues.cpp:40
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
void print(const std::string &s="HybridValues", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print required by Testable for unit testing
Definition HybridValues.h:70
│ │ │ +
void insert(Key j, const Vector &value)
Insert a vector value with key j.
Definition HybridValues.h:117
│ │ │ +
HybridValues & insert(const DiscreteValues &values)
Insert all discrete values from values.
Definition HybridValues.h:144
│ │ │ +
HybridValues(const VectorValues &cv, const DiscreteValues &dv, const Values &v)
Construct from all values types.
Definition HybridValues.h:61
│ │ │ +
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output as a html table.
Definition HybridValues.h:224
│ │ │ +
VectorValues continuousSubset(const KeyVector &keys) const
Extract continuous values with given keys.
Definition HybridValues.h:206
│ │ │ +
void insert_or_assign(Key j, const Vector &value)
insert_or_assign() , similar to Values.h
Definition HybridValues.h:126
│ │ │ +
HybridValues & insert(const Values &values)
Insert all values from values.
Definition HybridValues.h:151
│ │ │ +
bool equals(const HybridValues &other, double tol=1e-9) const
equals required by Testable for unit testing
Definition HybridValues.h:79
│ │ │ +
HybridValues & update(const VectorValues &values)
For all key/value pairs in values, replace continuous values with corresponding keys in this object w...
Definition HybridValues.h:181
│ │ │ +
const DiscreteValues & discrete() const
Return the discrete values.
Definition HybridValues.h:92
│ │ │ +
bool existsDiscrete(Key j)
Check whether a variable with key j exists in DiscreteValues.
Definition HybridValues.h:101
│ │ │ +
const VectorValues & continuous() const
Return the multi-dimensional vector values.
Definition HybridValues.h:89
│ │ │ +
Vector & at(Key j)
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist.
Definition HybridValues.h:169
│ │ │ +
bool exists(Key j)
Check whether a variable with key j exists.
Definition HybridValues.h:109
│ │ │ +
HybridValues & update(const DiscreteValues &values)
For all key/value pairs in values, replace discrete values with corresponding keys in this object wit...
Definition HybridValues.h:190
│ │ │ +
HybridValues & insert(const HybridValues &values)
Insert all values from values.
Definition HybridValues.h:158
│ │ │ +
HybridValues & insert(const VectorValues &values)
Insert all continuous values from values.
Definition HybridValues.h:137
│ │ │ +
void insert(Key j, size_t value)
Insert a discrete value with key j.
Definition HybridValues.h:123
│ │ │ +
const Values & nonlinear() const
Return the nonlinear values.
Definition HybridValues.h:95
│ │ │ +
bool existsNonlinear(Key j)
Check whether a variable with key j exists in values.
Definition HybridValues.h:104
│ │ │ +
HybridValues & update(const HybridValues &values)
For all key/value pairs in values, replace all values with corresponding keys in this object with tho...
Definition HybridValues.h:199
│ │ │ +
HybridValues()=default
Default constructor creates an empty HybridValues.
│ │ │ +
bool existsVector(Key j)
Check whether a variable with key j exists in VectorValues.
Definition HybridValues.h:98
│ │ │ +
HybridValues(const VectorValues &cv, const DiscreteValues &dv)
Construct from DiscreteValues and VectorValues.
Definition HybridValues.h:57
│ │ │ +
size_t & atDiscrete(Key j)
Read/write access to the discrete value with key j, throws std::out_of_range if j does not exist.
Definition HybridValues.h:175
│ │ │ +
void insert_or_assign(Key j, size_t value)
insert_or_assign() , similar to Values.h
Definition HybridValues.h:131
│ │ │ +
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
iterator insert(const std::pair< Key, Vector > &key_value)
Insert a vector value with key j.
Definition VectorValues.cpp:91
│ │ │ +
void print(const std::string &str="VectorValues", const KeyFormatter &formatter=DefaultKeyFormatter) const
print required by Testable for unit testing
Definition VectorValues.cpp:158
│ │ │ +
bool equals(const VectorValues &x, double tol=1e-9) const
equals required by Testable for unit testing
Definition VectorValues.cpp:166
│ │ │ +
bool exists(Key j) const
Check whether a variable with key j exists.
Definition VectorValues.h:133
│ │ │ +
std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output as a html table.
Definition VectorValues.cpp:387
│ │ │ +
void insert_or_assign(Key j, const Vector &value)
insert_or_assign that mimics the STL map insert_or_assign - if the value already exists,...
Definition VectorValues.h:219
│ │ │ +
Vector & at(Key j)
Read/write access to the vector value with key j, throws std::out_of_range if j does not exist,...
Definition VectorValues.h:139
│ │ │ +
VectorValues & update(const VectorValues &values)
For all key/value pairs in values, replace values with corresponding keys in this class with those in...
Definition VectorValues.cpp:101
│ │ │ +
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
│ │ │ +
bool exists(Key j) const
Check if a value exists with key j.
Definition Values.cpp:94
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridJunctionTree.h │ │ │ │ +HybridValues.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,65 +16,377 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 18#pragma once │ │ │ │ 19 │ │ │ │ -20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -22#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> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -26// Forward declarations │ │ │ │ -27class HybridEliminationTree; │ │ │ │ -28 │ │ │ │ -_5_2class GTSAM_EXPORT _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ -53 : public _J_u_n_c_t_i_o_n_T_r_e_e { │ │ │ │ -54 │ │ │ │ -55 public: │ │ │ │ -56 typedef _J_u_n_c_t_i_o_n_T_r_e_e_<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_,_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ -_5_7 _B_a_s_e; │ │ │ │ -_5_8 typedef _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ -_5_9 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ -60 │ │ │ │ -70 _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e& eliminationTree); │ │ │ │ -71}; │ │ │ │ -72 │ │ │ │ -73} // namespace gtsam │ │ │ │ -_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Linearized Hybrid factor graph that uses type erasure. │ │ │ │ -_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h │ │ │ │ -Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ -_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ -The junction tree. │ │ │ │ +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_/_d_i_s_c_r_e_t_e_/_D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +24#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> │ │ │ │ +25#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_V_a_l_u_e_s_._h> │ │ │ │ +26 │ │ │ │ +27#include │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +_3_8class GTSAM_EXPORT _H_y_b_r_i_d_V_a_l_u_e_s { │ │ │ │ +39 private: │ │ │ │ +41 _V_e_c_t_o_r_V_a_l_u_e_s continuous_; │ │ │ │ +42 │ │ │ │ +44 _D_i_s_c_r_e_t_e_V_a_l_u_e_s discrete_; │ │ │ │ +45 │ │ │ │ +47 _V_a_l_u_e_s nonlinear_; │ │ │ │ +48 │ │ │ │ +49 public: │ │ │ │ +52 │ │ │ │ +_5_4 _H_y_b_r_i_d_V_a_l_u_e_s() = default; │ │ │ │ +55 │ │ │ │ +_5_7 _H_y_b_r_i_d_V_a_l_u_e_s(const _V_e_c_t_o_r_V_a_l_u_e_s& cv, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& dv) │ │ │ │ +58 : continuous_(cv), discrete_(dv){}; │ │ │ │ +59 │ │ │ │ +_6_1 _H_y_b_r_i_d_V_a_l_u_e_s(const _V_e_c_t_o_r_V_a_l_u_e_s& cv, const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& dv, │ │ │ │ +62 const _V_a_l_u_e_s& v) │ │ │ │ +63 : continuous_(cv), discrete_(dv), nonlinear_(v){}; │ │ │ │ +64 │ │ │ │ +68 │ │ │ │ +_7_0 void _p_r_i_n_t(const std::string& s = "HybridValues", │ │ │ │ +71 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const { │ │ │ │ +72 std::cout << s << ": \n"; │ │ │ │ +73 continuous_._p_r_i_n_t(" Continuous", │ │ │ │ +74 keyFormatter); // print continuous components │ │ │ │ +75 discrete_._p_r_i_n_t(" Discrete", keyFormatter); // print discrete components │ │ │ │ +76 }; │ │ │ │ +77 │ │ │ │ +_7_9 bool _e_q_u_a_l_s(const _H_y_b_r_i_d_V_a_l_u_e_s& other, double tol = 1e-9) const { │ │ │ │ +80 return continuous_._e_q_u_a_l_s(other.continuous_, tol) && │ │ │ │ +81 discrete_._e_q_u_a_l_s(other.discrete_, tol); │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +87 │ │ │ │ +_8_9 const _V_e_c_t_o_r_V_a_l_u_e_s& _c_o_n_t_i_n_u_o_u_s() const { return continuous_; } │ │ │ │ +90 │ │ │ │ +_9_2 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& _d_i_s_c_r_e_t_e() const { return discrete_; } │ │ │ │ +93 │ │ │ │ +_9_5 const _V_a_l_u_e_s& _n_o_n_l_i_n_e_a_r() const { return nonlinear_; } │ │ │ │ +96 │ │ │ │ +_9_8 bool _e_x_i_s_t_s_V_e_c_t_o_r(_K_e_y j) { return continuous_._e_x_i_s_t_s(j); }; │ │ │ │ +99 │ │ │ │ +_1_0_1 bool _e_x_i_s_t_s_D_i_s_c_r_e_t_e(_K_e_y j) { return (discrete_.find(j) != discrete_.end()); │ │ │ │ +}; │ │ │ │ +102 │ │ │ │ +_1_0_4 bool _e_x_i_s_t_s_N_o_n_l_i_n_e_a_r(_K_e_y j) { │ │ │ │ +105 return nonlinear_._e_x_i_s_t_s(j); │ │ │ │ +106 }; │ │ │ │ +107 │ │ │ │ +_1_0_9 bool _e_x_i_s_t_s(_K_e_y j) { │ │ │ │ +110 return existsVector(j) || existsDiscrete(j) || existsNonlinear(j); │ │ │ │ +111 }; │ │ │ │ +112 │ │ │ │ +_1_1_7 void _i_n_s_e_r_t(_K_e_y j, const Vector& value) { continuous_._i_n_s_e_r_t(j, value); } │ │ │ │ +118 │ │ │ │ +_1_2_3 void _i_n_s_e_r_t(_K_e_y j, size_t value) { discrete_[j] = value; }; │ │ │ │ +124 │ │ │ │ +_1_2_6 void _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_K_e_y j, const Vector& value) { │ │ │ │ +127 continuous_._i_n_s_e_r_t___o_r___a_s_s_i_g_n(j, value); │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +_1_3_1 void _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_K_e_y j, size_t value) { │ │ │ │ +132 discrete_[j] = value; │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +_1_3_7 _H_y_b_r_i_d_V_a_l_u_e_s& _i_n_s_e_r_t(const _V_e_c_t_o_r_V_a_l_u_e_s& values) { │ │ │ │ +138 continuous_._i_n_s_e_r_t(values); │ │ │ │ +139 return *this; │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +_1_4_4 _H_y_b_r_i_d_V_a_l_u_e_s& _i_n_s_e_r_t(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) { │ │ │ │ +145 discrete_.insert(values); │ │ │ │ +146 return *this; │ │ │ │ +147 } │ │ │ │ +148 │ │ │ │ +_1_5_1 _H_y_b_r_i_d_V_a_l_u_e_s& _i_n_s_e_r_t(const _V_a_l_u_e_s& values) { │ │ │ │ +152 nonlinear_._i_n_s_e_r_t(values); │ │ │ │ +153 return *this; │ │ │ │ +154 } │ │ │ │ +155 │ │ │ │ +_1_5_8 _H_y_b_r_i_d_V_a_l_u_e_s& _i_n_s_e_r_t(const _H_y_b_r_i_d_V_a_l_u_e_s& values) { │ │ │ │ +159 continuous_._i_n_s_e_r_t(values._c_o_n_t_i_n_u_o_u_s()); │ │ │ │ +160 discrete_.insert(values._d_i_s_c_r_e_t_e()); │ │ │ │ +161 nonlinear_._i_n_s_e_r_t(values._n_o_n_l_i_n_e_a_r()); │ │ │ │ +162 return *this; │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ +_1_6_9 Vector& _a_t(_K_e_y j) { return continuous_._a_t(j); }; │ │ │ │ +170 │ │ │ │ +_1_7_5 size_t& _a_t_D_i_s_c_r_e_t_e(_K_e_y j) { return discrete_.at(j); }; │ │ │ │ +176 │ │ │ │ +_1_8_1 _H_y_b_r_i_d_V_a_l_u_e_s& _u_p_d_a_t_e(const _V_e_c_t_o_r_V_a_l_u_e_s& values) { │ │ │ │ +182 continuous_._u_p_d_a_t_e(values); │ │ │ │ +183 return *this; │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +_1_9_0 _H_y_b_r_i_d_V_a_l_u_e_s& _u_p_d_a_t_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& values) { │ │ │ │ +191 discrete_._u_p_d_a_t_e(values); │ │ │ │ +192 return *this; │ │ │ │ +193 } │ │ │ │ +194 │ │ │ │ +_1_9_9 _H_y_b_r_i_d_V_a_l_u_e_s& _u_p_d_a_t_e(const _H_y_b_r_i_d_V_a_l_u_e_s& values) { │ │ │ │ +200 continuous_._u_p_d_a_t_e(values._c_o_n_t_i_n_u_o_u_s()); │ │ │ │ +201 discrete_._u_p_d_a_t_e(values._d_i_s_c_r_e_t_e()); │ │ │ │ +202 return *this; │ │ │ │ +203 } │ │ │ │ +204 │ │ │ │ +_2_0_6 _V_e_c_t_o_r_V_a_l_u_e_s _c_o_n_t_i_n_u_o_u_s_S_u_b_s_e_t(const _K_e_y_V_e_c_t_o_r& keys) const { │ │ │ │ +207 _V_e_c_t_o_r_V_a_l_u_e_s measurements; │ │ │ │ +208 for (const auto& key : keys) { │ │ │ │ +209 measurements._i_n_s_e_r_t(key, continuous_._a_t(key)); │ │ │ │ +210 } │ │ │ │ +211 return measurements; │ │ │ │ +212 } │ │ │ │ +213 │ │ │ │ +217 │ │ │ │ +_2_2_4 std::string _h_t_m_l( │ │ │ │ +225 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const { │ │ │ │ +226 std::stringstream ss; │ │ │ │ +227 ss << this->continuous_._h_t_m_l(keyFormatter); │ │ │ │ +228 ss << this->discrete_._h_t_m_l(keyFormatter); │ │ │ │ +229 return ss.str(); │ │ │ │ +230 }; │ │ │ │ +231 │ │ │ │ +233}; │ │ │ │ +234 │ │ │ │ +235// traits │ │ │ │ +236template <> │ │ │ │ +_2_3_7struct _t_r_a_i_t_s<_H_y_b_r_i_d_V_a_l_u_e_s> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +238 │ │ │ │ +239} // 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 │ │ │ │ +_D_i_s_c_r_e_t_e_V_a_l_u_e_s_._h │ │ │ │ +_K_e_y_._h │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ +Factor Graph Values. │ │ │ │ +_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_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ -Elimination Tree type for Hybrid Factor Graphs. │ │ │ │ -DDeeffiinniittiioonn HybridEliminationTree.h:32 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridJunctionTree.h:53 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_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 pointer to this class. │ │ │ │ -DDeeffiinniittiioonn HybridJunctionTree.h:59 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ -JunctionTree< HybridBayesTree, HybridGaussianFactorGraph > Base │ │ │ │ -Base class. │ │ │ │ -DDeeffiinniittiioonn HybridJunctionTree.h:57 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ -HybridJunctionTree This │ │ │ │ -This class. │ │ │ │ -DDeeffiinniittiioonn HybridJunctionTree.h:58 │ │ │ │ -_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_:_:_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_:_:_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_:_:_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_:_:_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_V_a_l_u_e_s_:_:_h_t_m_l │ │ │ │ +std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter, const │ │ │ │ +Names &names={}) const │ │ │ │ +Output as a html table. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:104 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_u_p_d_a_t_e │ │ │ │ +DiscreteValues & update(const DiscreteValues &values) │ │ │ │ +For all key/value pairs in values, replace values with corresponding keys in │ │ │ │ +this object with those i... │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:63 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="", const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +print required by Testable. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:31 │ │ │ │ +_g_t_s_a_m_:_:_D_i_s_c_r_e_t_e_V_a_l_u_e_s_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const DiscreteValues &x, double tol=1e-9) const │ │ │ │ +equals required by Testable for unit testing. │ │ │ │ +DDeeffiinniittiioonn DiscreteValues.cpp:40 │ │ │ │ +_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_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="HybridValues", const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +print required by Testable for unit testing │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:70 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +void insert(Key j, const Vector &value) │ │ │ │ +Insert a vector value with key j. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:117 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +HybridValues & insert(const DiscreteValues &values) │ │ │ │ +Insert all discrete values from values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:144 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +HybridValues(const VectorValues &cv, const DiscreteValues &dv, const Values &v) │ │ │ │ +Construct from all values types. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:61 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_h_t_m_l │ │ │ │ +std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const │ │ │ │ +Output as a html table. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:224 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_c_o_n_t_i_n_u_o_u_s_S_u_b_s_e_t │ │ │ │ +VectorValues continuousSubset(const KeyVector &keys) const │ │ │ │ +Extract continuous values with given keys. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:206 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ +void insert_or_assign(Key j, const Vector &value) │ │ │ │ +insert_or_assign() , similar to Values.h │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:126 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +HybridValues & insert(const Values &values) │ │ │ │ +Insert all values from values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:151 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const HybridValues &other, double tol=1e-9) const │ │ │ │ +equals required by Testable for unit testing │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:79 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_u_p_d_a_t_e │ │ │ │ +HybridValues & update(const VectorValues &values) │ │ │ │ +For all key/value pairs in values, replace continuous values with corresponding │ │ │ │ +keys in this object w... │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:181 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_d_i_s_c_r_e_t_e │ │ │ │ +const DiscreteValues & discrete() const │ │ │ │ +Return the discrete values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:92 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_e_x_i_s_t_s_D_i_s_c_r_e_t_e │ │ │ │ +bool existsDiscrete(Key j) │ │ │ │ +Check whether a variable with key j exists in DiscreteValues. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:101 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_c_o_n_t_i_n_u_o_u_s │ │ │ │ +const VectorValues & continuous() const │ │ │ │ +Return the multi-dimensional vector values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:89 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_a_t │ │ │ │ +Vector & at(Key j) │ │ │ │ +Read/write access to the vector value with key j, throws std::out_of_range if j │ │ │ │ +does not exist. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:169 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_e_x_i_s_t_s │ │ │ │ +bool exists(Key j) │ │ │ │ +Check whether a variable with key j exists. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:109 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_u_p_d_a_t_e │ │ │ │ +HybridValues & update(const DiscreteValues &values) │ │ │ │ +For all key/value pairs in values, replace discrete values with corresponding │ │ │ │ +keys in this object wit... │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:190 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +HybridValues & insert(const HybridValues &values) │ │ │ │ +Insert all values from values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:158 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +HybridValues & insert(const VectorValues &values) │ │ │ │ +Insert all continuous values from values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:137 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +void insert(Key j, size_t value) │ │ │ │ +Insert a discrete value with key j. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:123 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_n_o_n_l_i_n_e_a_r │ │ │ │ +const Values & nonlinear() const │ │ │ │ +Return the nonlinear values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:95 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_e_x_i_s_t_s_N_o_n_l_i_n_e_a_r │ │ │ │ +bool existsNonlinear(Key j) │ │ │ │ +Check whether a variable with key j exists in values. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:104 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_u_p_d_a_t_e │ │ │ │ +HybridValues & update(const HybridValues &values) │ │ │ │ +For all key/value pairs in values, replace all values with corresponding keys │ │ │ │ +in this object with tho... │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:199 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +HybridValues()=default │ │ │ │ +Default constructor creates an empty HybridValues. │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_e_x_i_s_t_s_V_e_c_t_o_r │ │ │ │ +bool existsVector(Key j) │ │ │ │ +Check whether a variable with key j exists in VectorValues. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:98 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +HybridValues(const VectorValues &cv, const DiscreteValues &dv) │ │ │ │ +Construct from DiscreteValues and VectorValues. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:57 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_a_t_D_i_s_c_r_e_t_e │ │ │ │ +size_t & atDiscrete(Key j) │ │ │ │ +Read/write access to the discrete value with key j, throws std::out_of_range if │ │ │ │ +j does not exist. │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:175 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_V_a_l_u_e_s_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ +void insert_or_assign(Key j, size_t value) │ │ │ │ +insert_or_assign() , similar to Values.h │ │ │ │ +DDeeffiinniittiioonn HybridValues.h:131 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +VectorValues represents a collection of vector-valued variables associated each │ │ │ │ +with a unique integer... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const std::pair< Key, Vector > &key_value) │ │ │ │ +Insert a vector value with key j. │ │ │ │ +DDeeffiinniittiioonn VectorValues.cpp:91 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &str="VectorValues", const KeyFormatter │ │ │ │ +&formatter=DefaultKeyFormatter) const │ │ │ │ +print required by Testable for unit testing │ │ │ │ +DDeeffiinniittiioonn VectorValues.cpp:158 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const VectorValues &x, double tol=1e-9) const │ │ │ │ +equals required by Testable for unit testing │ │ │ │ +DDeeffiinniittiioonn VectorValues.cpp:166 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_e_x_i_s_t_s │ │ │ │ +bool exists(Key j) const │ │ │ │ +Check whether a variable with key j exists. │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:133 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_h_t_m_l │ │ │ │ +std::string html(const KeyFormatter &keyFormatter=DefaultKeyFormatter) const │ │ │ │ +Output as a html table. │ │ │ │ +DDeeffiinniittiioonn VectorValues.cpp:387 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_i_n_s_e_r_t___o_r___a_s_s_i_g_n │ │ │ │ +void insert_or_assign(Key j, const Vector &value) │ │ │ │ +insert_or_assign that mimics the STL map insert_or_assign - if the value │ │ │ │ +already exists,... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:219 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_a_t │ │ │ │ +Vector & at(Key j) │ │ │ │ +Read/write access to the vector value with key j, throws std::out_of_range if j │ │ │ │ +does not exist,... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:139 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_u_p_d_a_t_e │ │ │ │ +VectorValues & update(const VectorValues &values) │ │ │ │ +For all key/value pairs in values, replace values with corresponding keys in │ │ │ │ +this class with those in... │ │ │ │ +DDeeffiinniittiioonn VectorValues.cpp:101 │ │ │ │ +_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_:_:_V_a_l_u_e_s_:_:_e_x_i_s_t_s │ │ │ │ +bool exists(Key j) const │ │ │ │ +Check if a value exists with key j. │ │ │ │ +DDeeffiinniittiioonn Values.cpp:94 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00509.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridConditional.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,32 +94,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
HybridJunctionTree.cpp File Reference
│ │ │ +
HybridConditional.h File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::HybridConditional
 Hybrid Conditional Density. More...
 
struct  gtsam::traits< HybridConditional >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │
Date
Mar 11, 2022
│ │ │
Author
Fan Jiang
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,27 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridJunctionTree.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridConditional.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_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +  Hybrid _C_o_n_d_i_t_i_o_n_a_l Density. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_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 ********** │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_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/a00512.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianISAM.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,53 +94,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
HybridGaussianISAM.h File Reference
│ │ │ +
HybridJunctionTree.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::HybridGaussianISAM
 
struct  gtsam::traits< HybridGaussianISAM >
 traits More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Date
March 31, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ -
Date
March 31, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
│ │ │ -Richard Roberts
│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── 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 │ │ │ │ -HybridGaussianISAM.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_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_ _> │ │ │ │ -  traits _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridJunctionTree.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ - March 31, 2022 │ │ │ │ - Author │ │ │ │ - Fan Jiang │ │ │ │ - Frank Dellaert │ │ │ │ - Varun Agrawal │ │ │ │ - Date │ │ │ │ - March 31, 2022 │ │ │ │ + Mar 11, 2022 │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ - Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00518.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianFactorGraph.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,56 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ Functions
│ │ │ -
HybridGaussianFactorGraph.h File Reference
│ │ │ +
HybridFactor.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Linearized Hybrid factor graph that uses type erasure. │ │ │ -More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

struct  gtsam::EliminationTraits< HybridGaussianFactorGraph >
 
class  gtsam::HybridGaussianFactorGraph
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ Functions

std::pair< HybridConditional::shared_ptr, boost::shared_ptr< Factor > > gtsam::EliminateHybrid (const HybridGaussianFactorGraph &factors, const Ordering &keys)
 Main elimination function for HybridGaussianFactorGraph.
 
const Ordering gtsam::HybridOrdering (const HybridGaussianFactorGraph &graph)
 Return a Colamd constrained ordering where the discrete keys are eliminated after the continuous keys.
 
│ │ │ +KeyVector gtsam::CollectKeys (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
 
│ │ │ +KeyVector gtsam::CollectKeys (const KeyVector &keys1, const KeyVector &keys2)
 
│ │ │ +DiscreteKeys gtsam::CollectDiscreteKeys (const DiscreteKeys &key1, const DiscreteKeys &key2)
 
│ │ │

Detailed Description

│ │ │ -

Linearized Hybrid factor graph that uses type erasure.

│ │ │ -
Author
Fan Jiang, Varun Agrawal, Frank Dellaert
│ │ │ -
Date
Mar 11, 2022
│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,41 +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 | _F_u_n_c_t_i_o_n_s │ │ │ │ -HybridGaussianFactorGraph.h File Reference │ │ │ │ -Linearized Hybrid factor graph that uses type erasure. _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_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +HybridFactor.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ - std::pair< _H_y_b_r_i_d_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_H_y_b_r_i_d (const │ │ │ │ -_s_h_a_r_e_d___p_t_r, boost::shared_ptr< _F_a_c_t_o_r > _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &factors, │ │ │ │ - >  const _O_r_d_e_r_i_n_g &keys) │ │ │ │ -  Main elimination function for │ │ │ │ - _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ + _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &continuousKeys, const │ │ │ │ + _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys) │ │ │ │ +  │ │ │ │ + _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &keys1, const _K_e_y_V_e_c_t_o_r │ │ │ │ + &keys2) │ │ │ │   │ │ │ │ - const _O_r_d_e_r_i_n_g  _g_t_s_a_m_:_:_H_y_b_r_i_d_O_r_d_e_r_i_n_g (const │ │ │ │ - _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &graph) │ │ │ │ - Return a Colamd constrained ordering │ │ │ │ -  where the discrete keys are eliminated │ │ │ │ - after the continuous keys. │ │ │ │ +_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::CCoolllleeccttDDiissccrreetteeKKeeyyss (const _D_i_s_c_r_e_t_e_K_e_y_s &key1, const │ │ │ │ + _D_i_s_c_r_e_t_e_K_e_y_s &key2) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Linearized Hybrid factor graph that uses type erasure. │ │ │ │ - Author │ │ │ │ - Fan Jiang, Varun Agrawal, Frank Dellaert │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ + Author │ │ │ │ + Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00521.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianFactorGraph.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,60 +94,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
HybridGaussianFactorGraph.cpp File Reference
│ │ │ +Namespaces
│ │ │ +
GaussianMixtureFactor.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Hybrid factor graph that uses type erasure. │ │ │ +

A set of Gaussian factors indexed by a set of discrete keys. │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ -Typedefs

│ │ │ -using gtsam::OrphanWrapper = BayesTreeOrphanWrapper< HybridBayesTree::Clique >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

const Ordering gtsam::HybridOrdering (const HybridGaussianFactorGraph &graph)
 Return a Colamd constrained ordering where the discrete keys are eliminated after the continuous keys.
 
│ │ │ -GaussianFactorGraphTree gtsam::removeEmpty (const GaussianFactorGraphTree &sum)
 
std::pair< HybridConditional::shared_ptr, boost::shared_ptr< Factor > > gtsam::EliminateHybrid (const HybridGaussianFactorGraph &factors, const Ordering &keys)
 Main elimination function for HybridGaussianFactorGraph.
 
│ │ │

Detailed Description

│ │ │ -

Hybrid factor graph that uses type erasure.

│ │ │ +

A set of Gaussian factors indexed by a set of discrete keys.

│ │ │
Author
Fan Jiang
│ │ │
│ │ │ Varun Agrawal
│ │ │
│ │ │ Frank Dellaert
│ │ │ -
Date
Mar 11, 2022
│ │ │ +
Date
Mar 12, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,43 +1,24 @@ │ │ │ │ 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 │ │ │ │ -HybridGaussianFactorGraph.cpp File Reference │ │ │ │ -Hybrid factor graph that uses type erasure. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +GaussianMixtureFactor.cpp File Reference │ │ │ │ +A set of Gaussian factors indexed by a set of discrete keys. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::OOrrpphhaannWWrraappppeerr = _B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r< _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_:_:_C_l_i_q_u_e > │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - const _O_r_d_e_r_i_n_g  _g_t_s_a_m_:_:_H_y_b_r_i_d_O_r_d_e_r_i_n_g (const │ │ │ │ - _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &graph) │ │ │ │ - Return a Colamd constrained ordering │ │ │ │ -  where the discrete keys are eliminated │ │ │ │ - after the continuous keys. │ │ │ │ -  │ │ │ │ - _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e  ggttssaamm::::rreemmoovveeEEmmppttyy (const │ │ │ │ - _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum) │ │ │ │ -  │ │ │ │ - std::pair< _H_y_b_r_i_d_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_H_y_b_r_i_d (const │ │ │ │ -_s_h_a_r_e_d___p_t_r, boost::shared_ptr< _F_a_c_t_o_r > _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &factors, │ │ │ │ - >  const _O_r_d_e_r_i_n_g &keys) │ │ │ │ -  Main elimination function for │ │ │ │ - _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Hybrid factor graph that uses type erasure. │ │ │ │ +A set of Gaussian factors indexed by a set of discrete keys. │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ - Mar 11, 2022 │ │ │ │ + Mar 12, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ + * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_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/a00524.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactorGraph.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,53 +95,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs
│ │ │ -
HybridFactorGraph.h File Reference
│ │ │ +Namespaces
│ │ │ +
HybridSmoother.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Factor graph with utilities for hybrid factors. │ │ │ +

An incremental smoother for hybrid factor graphs. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridFactorGraph
 Hybrid Factor Graph Factor graph with utilities for hybrid factors. More...
class  gtsam::HybridSmoother
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Typedefs

│ │ │ -using gtsam::SharedFactor = boost::shared_ptr< Factor >
 
│ │ │

Detailed Description

│ │ │ -

Factor graph with utilities for hybrid factors.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
Date
May 28, 2022
│ │ │ +

An incremental smoother for hybrid factor graphs.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
Date
October 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,32 +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 | _T_y_p_e_d_e_f_s │ │ │ │ -HybridFactorGraph.h File Reference │ │ │ │ -Factor graph with utilities for hybrid factors. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridSmoother.h File Reference │ │ │ │ +An incremental smoother for hybrid factor graphs. _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_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -  Hybrid _F_a_c_t_o_r Graph _F_a_c_t_o_r graph with utilities for hybrid factors. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::SShhaarreeddFFaaccttoorr = boost::shared_ptr< _F_a_c_t_o_r > │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Factor graph with utilities for hybrid factors. │ │ │ │ +An incremental smoother for hybrid factor graphs. │ │ │ │ Author │ │ │ │ Varun Agrawal │ │ │ │ - Frank Dellaert │ │ │ │ Date │ │ │ │ - May 28, 2022 │ │ │ │ + October 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ + * _H_y_b_r_i_d_S_m_o_o_t_h_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/a00524.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00524 = [ │ │ │ │ - ["gtsam::HybridFactorGraph", "a03456.html", "a03456"] │ │ │ │ + ["gtsam::HybridSmoother", "a03500.html", "a03500"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00524_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactorGraph.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,92 +98,73 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridFactorGraph.h
│ │ │ +
HybridSmoother.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
│ │ │ +
23namespace gtsam {
│ │ │
24
│ │ │ -
25#include <boost/format.hpp>
│ │ │ -
26#include <unordered_map>
│ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ +
│ │ │ + │ │ │ +
26 private:
│ │ │ +
27 HybridBayesNet hybridBayesNet_;
│ │ │ +
28 HybridGaussianFactorGraph remainingFactorGraph_;
│ │ │
29
│ │ │ -
30class DiscreteFactor;
│ │ │ -
31class Ordering;
│ │ │ -
32
│ │ │ -
33using SharedFactor = boost::shared_ptr<Factor>;
│ │ │ -
34
│ │ │ -
│ │ │ -
39class HybridFactorGraph : public FactorGraph<Factor> {
│ │ │ -
40 public:
│ │ │ - │ │ │ - │ │ │ -
43 using shared_ptr = boost::shared_ptr<This>;
│ │ │ -
44
│ │ │ - │ │ │ -
46 using Indices = KeyVector;
│ │ │ -
47
│ │ │ -
48 public:
│ │ │ -
51
│ │ │ -
53 HybridFactorGraph() = default;
│ │ │ +
30 public:
│ │ │ +
50 void update(HybridGaussianFactorGraph graph, const Ordering& ordering,
│ │ │ +
51 boost::optional<size_t> maxNrLeaves = boost::none);
│ │ │ +
52
│ │ │ +
53 Ordering getOrdering(const HybridGaussianFactorGraph& newFactors);
│ │ │
54
│ │ │ -
60 template <class DERIVEDFACTOR>
│ │ │ - │ │ │ -
62
│ │ │ -
66
│ │ │ -
68 std::set<DiscreteKey> discreteKeys() const;
│ │ │ -
69
│ │ │ -
71 KeySet discreteKeySet() const;
│ │ │ -
72
│ │ │ -
74 std::unordered_map<Key, DiscreteKey> discreteKeyMap() const;
│ │ │ -
75
│ │ │ -
77 const KeySet continuousKeySet() const;
│ │ │ -
78
│ │ │ -
80};
│ │ │ -
│ │ │ -
81
│ │ │ -
82} // namespace gtsam
│ │ │ - │ │ │ -
Factor Graph Base Class.
│ │ │ +
64 std::pair<HybridGaussianFactorGraph, HybridBayesNet> addConditionals(
│ │ │ +
65 const HybridGaussianFactorGraph& graph,
│ │ │ +
66 const HybridBayesNet& hybridBayesNet, const Ordering& ordering) const;
│ │ │ +
67
│ │ │ +
69 GaussianMixture::shared_ptr gaussianMixture(size_t index) const;
│ │ │ +
70
│ │ │ +
72 const HybridBayesNet& hybridBayesNet() const;
│ │ │ +
73};
│ │ │ +
│ │ │ +
74
│ │ │ +
75}; // namespace gtsam
│ │ │ + │ │ │ +
A Bayes net of Gaussian Conditionals indexed by discrete keys.
│ │ │ +
Linearized Hybrid factor graph that uses type erasure.
│ │ │
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
│ │ │ - │ │ │ -
Hybrid Factor Graph Factor graph with utilities for hybrid factors.
Definition HybridFactorGraph.h:39
│ │ │ -
HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition HybridFactorGraph.h:61
│ │ │ -
KeySet discreteKeySet() const
Get all the discrete keys in the factor graph, as a set.
Definition HybridFactorGraph.cpp:46
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to This
Definition HybridFactorGraph.h:43
│ │ │ -
std::unordered_map< Key, DiscreteKey > discreteKeyMap() const
Get a map from Key to corresponding DiscreteKey.
Definition HybridFactorGraph.cpp:56
│ │ │ -
const KeySet continuousKeySet() const
Get all the continuous keys in the factor graph.
Definition HybridFactorGraph.cpp:65
│ │ │ -
HybridFactorGraph()=default
Default constructor.
│ │ │ -
std::set< DiscreteKey > discreteKeys() const
Get all the discrete keys in the factor graph.
Definition HybridFactorGraph.cpp:28
│ │ │ -
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ -
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
│ │ │ +
A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals,...
Definition HybridBayesNet.h:35
│ │ │ +
Definition HybridGaussianFactorGraph.h:102
│ │ │ +
Definition HybridSmoother.h:25
│ │ │ +
GaussianMixture::shared_ptr gaussianMixture(size_t index) const
Get the Gaussian Mixture from the Bayes Net posterior at index.
Definition HybridSmoother.cpp:131
│ │ │ +
void update(HybridGaussianFactorGraph graph, const Ordering &ordering, boost::optional< size_t > maxNrLeaves=boost::none)
Given new factors, perform an incremental update.
Definition HybridSmoother.cpp:58
│ │ │ +
std::pair< HybridGaussianFactorGraph, HybridBayesNet > addConditionals(const HybridGaussianFactorGraph &graph, const HybridBayesNet &hybridBayesNet, const Ordering &ordering) const
Add conditionals from previous timestep as part of liquefication.
Definition HybridSmoother.cpp:85
│ │ │ +
const HybridBayesNet & hybridBayesNet() const
Return the Bayes Net posterior.
Definition HybridSmoother.cpp:137
│ │ │ +
Definition Ordering.h:34
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,116 +1,88 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridFactorGraph.h │ │ │ │ +HybridSmoother.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_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +19#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> │ │ │ │ +20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +22 │ │ │ │ +23namespace _g_t_s_a_m { │ │ │ │ 24 │ │ │ │ -25#include │ │ │ │ -26#include │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ +_2_5class _H_y_b_r_i_d_S_m_o_o_t_h_e_r { │ │ │ │ +26 private: │ │ │ │ +27 _H_y_b_r_i_d_B_a_y_e_s_N_e_t hybridBayesNet_; │ │ │ │ +28 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h remainingFactorGraph_; │ │ │ │ 29 │ │ │ │ -30class DiscreteFactor; │ │ │ │ -31class Ordering; │ │ │ │ -32 │ │ │ │ -33using SharedFactor = boost::shared_ptr; │ │ │ │ -34 │ │ │ │ -_3_9class _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h : public _F_a_c_t_o_r_G_r_a_p_h { │ │ │ │ -40 public: │ │ │ │ -41 using _B_a_s_e = _F_a_c_t_o_r_G_r_a_p_h_<_F_a_c_t_o_r_>; │ │ │ │ -_4_2 using _T_h_i_s = _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h; │ │ │ │ -_4_3 using _s_h_a_r_e_d___p_t_r = boost::shared_ptr; │ │ │ │ -44 │ │ │ │ -_4_5 using _V_a_l_u_e_s = _g_t_s_a_m_:_:_V_a_l_u_e_s; │ │ │ │ -46 using Indices = _K_e_y_V_e_c_t_o_r; │ │ │ │ -47 │ │ │ │ -48 public: │ │ │ │ -51 │ │ │ │ -_5_3 _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h() = default; │ │ │ │ +30 public: │ │ │ │ +50 void _u_p_d_a_t_e(_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h graph, const _O_r_d_e_r_i_n_g& ordering, │ │ │ │ +51 boost::optional maxNrLeaves = boost::none); │ │ │ │ +52 │ │ │ │ +53 _O_r_d_e_r_i_n_g getOrdering(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& newFactors); │ │ │ │ 54 │ │ │ │ -60 template │ │ │ │ -_6_1 _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h(const _F_a_c_t_o_r_G_r_a_p_h_<_D_E_R_I_V_E_D_F_A_C_T_O_R_>& graph) : _B_a_s_e(graph) {} │ │ │ │ -62 │ │ │ │ -66 │ │ │ │ -68 std::set _d_i_s_c_r_e_t_e_K_e_y_s() const; │ │ │ │ -69 │ │ │ │ -71 _K_e_y_S_e_t _d_i_s_c_r_e_t_e_K_e_y_S_e_t() const; │ │ │ │ -72 │ │ │ │ -74 std::unordered_map _d_i_s_c_r_e_t_e_K_e_y_M_a_p() const; │ │ │ │ -75 │ │ │ │ -77 const _K_e_y_S_e_t _c_o_n_t_i_n_u_o_u_s_K_e_y_S_e_t() const; │ │ │ │ -78 │ │ │ │ -80}; │ │ │ │ -81 │ │ │ │ -82} // namespace gtsam │ │ │ │ -_H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ -_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Factor Graph Base Class. │ │ │ │ +64 std::pair _a_d_d_C_o_n_d_i_t_i_o_n_a_l_s( │ │ │ │ +65 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& graph, │ │ │ │ +66 const _H_y_b_r_i_d_B_a_y_e_s_N_e_t& _h_y_b_r_i_d_B_a_y_e_s_N_e_t, const _O_r_d_e_r_i_n_g& ordering) const; │ │ │ │ +67 │ │ │ │ +69 GaussianMixture::shared_ptr _g_a_u_s_s_i_a_n_M_i_x_t_u_r_e(size_t index) const; │ │ │ │ +70 │ │ │ │ +72 const _H_y_b_r_i_d_B_a_y_e_s_N_e_t& _h_y_b_r_i_d_B_a_y_e_s_N_e_t() const; │ │ │ │ +73}; │ │ │ │ +74 │ │ │ │ +75}; // namespace gtsam │ │ │ │ +_D_i_s_c_r_e_t_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ +A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ +_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Linearized Hybrid factor graph that uses type erasure. │ │ │ │ _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_:_:_F_a_s_t_S_e_t_<_ _K_e_y_ _> │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -Hybrid Factor Graph Factor graph with utilities for hybrid factors. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.h:39 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -HybridFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph) │ │ │ │ -Implicit copy/downcast constructor to override explicit template container │ │ │ │ -constructor. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.h:61 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_d_i_s_c_r_e_t_e_K_e_y_S_e_t │ │ │ │ -KeySet discreteKeySet() const │ │ │ │ -Get all the discrete keys in the factor graph, as a set. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.cpp:46 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ -boost::shared_ptr< This > shared_ptr │ │ │ │ -shared_ptr to This │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.h:43 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_d_i_s_c_r_e_t_e_K_e_y_M_a_p │ │ │ │ -std::unordered_map< Key, DiscreteKey > discreteKeyMap() const │ │ │ │ -Get a map from Key to corresponding DiscreteKey. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.cpp:56 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_c_o_n_t_i_n_u_o_u_s_K_e_y_S_e_t │ │ │ │ -const KeySet continuousKeySet() const │ │ │ │ -Get all the continuous keys in the factor graph. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.cpp:65 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -HybridFactorGraph()=default │ │ │ │ -Default constructor. │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_:_:_d_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -std::set< DiscreteKey > discreteKeys() const │ │ │ │ -Get all the discrete keys in the factor graph. │ │ │ │ -DDeeffiinniittiioonn HybridFactorGraph.cpp:28 │ │ │ │ -_g_t_s_a_m_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ -A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ -nodes. │ │ │ │ -DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ -_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_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +A hybrid Bayes net is a collection of HybridConditionals, which can have │ │ │ │ +discrete conditionals,... │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:102 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r │ │ │ │ +DDeeffiinniittiioonn HybridSmoother.h:25 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_g_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ +GaussianMixture::shared_ptr gaussianMixture(size_t index) const │ │ │ │ +Get the Gaussian Mixture from the Bayes Net posterior at index. │ │ │ │ +DDeeffiinniittiioonn HybridSmoother.cpp:131 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_u_p_d_a_t_e │ │ │ │ +void update(HybridGaussianFactorGraph graph, const Ordering &ordering, boost:: │ │ │ │ +optional< size_t > maxNrLeaves=boost::none) │ │ │ │ +Given new factors, perform an incremental update. │ │ │ │ +DDeeffiinniittiioonn HybridSmoother.cpp:58 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_a_d_d_C_o_n_d_i_t_i_o_n_a_l_s │ │ │ │ +std::pair< HybridGaussianFactorGraph, HybridBayesNet > addConditionals(const │ │ │ │ +HybridGaussianFactorGraph &graph, const HybridBayesNet &hybridBayesNet, const │ │ │ │ +Ordering &ordering) const │ │ │ │ +Add conditionals from previous timestep as part of liquefication. │ │ │ │ +DDeeffiinniittiioonn HybridSmoother.cpp:85 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_S_m_o_o_t_h_e_r_:_:_h_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +const HybridBayesNet & hybridBayesNet() const │ │ │ │ +Return the Bayes Net posterior. │ │ │ │ +DDeeffiinniittiioonn HybridSmoother.cpp:137 │ │ │ │ +_g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ +DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ + * _H_y_b_r_i_d_S_m_o_o_t_h_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/a00527.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactorGraph.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixture.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,38 +94,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
HybridFactorGraph.cpp File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
GaussianMixture.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Factor graph with utilities for hybrid factors. │ │ │ +

A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ More...

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

│ │ │ Namespaces

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

│ │ │ +Functions

│ │ │ +std::set< DiscreteKeygtsam::DiscreteKeysAsSet (const DiscreteKeys &discreteKeys)
 Return the DiscreteKey vector as a set.
 
│ │ │

Detailed Description

│ │ │ -

Factor graph with utilities for hybrid factors.

│ │ │ -
Author
Varun Agrawal
│ │ │ +

A hybrid conditional in the Conditional Linear Gaussian scheme.

│ │ │ +
Author
Fan Jiang
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │
│ │ │ Frank Dellaert
│ │ │ -
Date
January, 2023
│ │ │ +
Date
Mar 12, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,29 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridFactorGraph.cpp File Reference │ │ │ │ -Factor graph with utilities for hybrid factors. _M_o_r_e_._._. │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +GaussianMixture.cpp File Reference │ │ │ │ +A hybrid conditional in the Conditional Linear Gaussian scheme. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +std::set< _D_i_s_c_r_e_t_e_K_e_y >  ggttssaamm::::DDiissccrreetteeKKeeyyssAAssSSeett (const _D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ + &discreteKeys) │ │ │ │ +  Return the DiscreteKey vector as a set. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Factor graph with utilities for hybrid factors. │ │ │ │ +A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ │ Author │ │ │ │ + Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ Frank Dellaert │ │ │ │ Date │ │ │ │ - January, 2023 │ │ │ │ + Mar 12, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_._c_p_p │ │ │ │ + * _G_a_u_s_s_i_a_n_M_i_x_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/a00530.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactor.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesNet.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,63 +95,51 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Typedefs | │ │ │ -Functions
│ │ │ -
HybridFactor.h File Reference
│ │ │ +Namespaces
│ │ │ +
HybridBayesNet.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ +

A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ +More...

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridFactor
 Base class for truly hybrid probabilistic factors. More...
class  gtsam::HybridBayesNet
 A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals, Gaussian mixtures, or pure Gaussian conditionals. More...
 
struct  gtsam::traits< HybridFactor >
struct  gtsam::traits< HybridBayesNet >
 traits More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Typedefs

│ │ │ -using gtsam::GaussianFactorGraphTree = DecisionTree< Key, GaussianFactorGraph >
 Alias for DecisionTree of GaussianFactorGraphs.
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

│ │ │ -KeyVector gtsam::CollectKeys (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
 
│ │ │ -KeyVector gtsam::CollectKeys (const KeyVector &keys1, const KeyVector &keys2)
 
│ │ │ -DiscreteKeys gtsam::CollectDiscreteKeys (const DiscreteKeys &key1, const DiscreteKeys &key2)
 
│ │ │

Detailed Description

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ +

A Bayes net of Gaussian Conditionals indexed by discrete keys.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
│ │ │ +Fan Jiang
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
Date
December 2021
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +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 | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -HybridFactor.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridBayesNet.h File Reference │ │ │ │ +A Bayes net of Gaussian Conditionals indexed by discrete keys. _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_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -  Base class for ttrruullyy hybrid probabilistic factors. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ + A hybrid Bayes net is a collection of HybridConditionals, which can │ │ │ │ +  have discrete conditionals, Gaussian mixtures, or pure Gaussian │ │ │ │ + conditionals. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_F_a_c_t_o_r_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_B_a_y_e_s_N_e_t_ _> │ │ │ │ +  traits _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -using  ggttssaamm::::GGaauussssiiaannFFaaccttoorrGGrraapphhTTrreeee = _D_e_c_i_s_i_o_n_T_r_e_e< _K_e_y, _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ - > │ │ │ │ -  Alias for _D_e_c_i_s_i_o_n_T_r_e_e of GaussianFactorGraphs. │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &continuousKeys, const │ │ │ │ - _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys) │ │ │ │ -  │ │ │ │ - _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &keys1, const _K_e_y_V_e_c_t_o_r │ │ │ │ - &keys2) │ │ │ │ -  │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::CCoolllleeccttDDiissccrreetteeKKeeyyss (const _D_i_s_c_r_e_t_e_K_e_y_s &key1, const │ │ │ │ - _D_i_s_c_r_e_t_e_K_e_y_s &key2) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 11, 2022 │ │ │ │ +A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ Author │ │ │ │ + Varun Agrawal │ │ │ │ Fan Jiang │ │ │ │ + Frank Dellaert │ │ │ │ + Date │ │ │ │ + December 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00530.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00530 = [ │ │ │ │ - ["gtsam::traits< HybridFactor >", "a03452.html", null], │ │ │ │ - ["GaussianFactorGraphTree", "a00530.html#a8b4a8e0d32b81b0fa2fa15c437b89e7c", null] │ │ │ │ + ["gtsam::traits< HybridBayesNet >", "a03412.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00530_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactor.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesNet.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,157 +98,161 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridFactor.h
│ │ │ +
HybridBayesNet.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
│ │ │ +
2 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ +
3 * Atlanta, Georgia 30332-0415
│ │ │ +
4 * All Rights Reserved
│ │ │ +
5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ +
6 * See LICENSE for the license information
│ │ │ +
7 * -------------------------------------------------------------------------- */
│ │ │ +
8
│ │ │
18#pragma once
│ │ │
19
│ │ │ -
20#include <gtsam/base/Testable.h>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
26
│ │ │ -
27#include <cstddef>
│ │ │ -
28#include <string>
│ │ │ -
29namespace gtsam {
│ │ │ -
30
│ │ │ -
31class HybridValues;
│ │ │ -
32
│ │ │ - │ │ │ -
35
│ │ │ -
36KeyVector CollectKeys(const KeyVector &continuousKeys,
│ │ │ -
37 const DiscreteKeys &discreteKeys);
│ │ │ -
38KeyVector CollectKeys(const KeyVector &keys1, const KeyVector &keys2);
│ │ │ -
39DiscreteKeys CollectDiscreteKeys(const DiscreteKeys &key1,
│ │ │ -
40 const DiscreteKeys &key2);
│ │ │ -
41
│ │ │ -
│ │ │ -
52class GTSAM_EXPORT HybridFactor : public Factor {
│ │ │ -
53 private:
│ │ │ -
54 bool isDiscrete_ = false;
│ │ │ -
55 bool isContinuous_ = false;
│ │ │ -
56 bool isHybrid_ = false;
│ │ │ -
57
│ │ │ -
58 protected:
│ │ │ -
59 // Set of DiscreteKeys for this factor.
│ │ │ -
60 DiscreteKeys discreteKeys_;
│ │ │ - │ │ │ +
27namespace gtsam {
│ │ │ +
28
│ │ │ +
│ │ │ +
35class GTSAM_EXPORT HybridBayesNet : public BayesNet<HybridConditional> {
│ │ │ +
36 public:
│ │ │ + │ │ │ +
38 using This = HybridBayesNet;
│ │ │ + │ │ │ +
40 using shared_ptr = boost::shared_ptr<HybridBayesNet>;
│ │ │ +
41 using sharedConditional = boost::shared_ptr<ConditionalType>;
│ │ │ +
42
│ │ │ +
45
│ │ │ +
47 HybridBayesNet() = default;
│ │ │ +
48
│ │ │ +
52
│ │ │ +
54 void print(const std::string &s = "", const KeyFormatter &formatter =
│ │ │ +
55 DefaultKeyFormatter) const override;
│ │ │ +
56
│ │ │ +
58 bool equals(const This &fg, double tol = 1e-9) const;
│ │ │ +
59
│ │ │
63
│ │ │ -
64 public:
│ │ │ -
65 // typedefs needed to play nice with gtsam
│ │ │ - │ │ │ -
67 typedef boost::shared_ptr<HybridFactor>
│ │ │ - │ │ │ -
69 typedef Factor Base;
│ │ │ -
70
│ │ │ -
73
│ │ │ -
75 HybridFactor() = default;
│ │ │ -
76
│ │ │ -
82 explicit HybridFactor(const KeyVector &keys);
│ │ │ -
83
│ │ │ -
89 explicit HybridFactor(const DiscreteKeys &discreteKeys);
│ │ │ -
90
│ │ │ -
97 HybridFactor(const KeyVector &continuousKeys,
│ │ │ -
98 const DiscreteKeys &discreteKeys);
│ │ │ -
99
│ │ │ -
101 virtual ~HybridFactor() = default;
│ │ │ -
102
│ │ │ -
106
│ │ │ -
108 virtual bool equals(const HybridFactor &lf, double tol = 1e-9) const;
│ │ │ -
109
│ │ │ -
111 void print(
│ │ │ -
112 const std::string &s = "HybridFactor\n",
│ │ │ -
113 const KeyFormatter &formatter = DefaultKeyFormatter) const override;
│ │ │ -
114
│ │ │ -
118
│ │ │ -
120 bool isDiscrete() const { return isDiscrete_; }
│ │ │ -
121
│ │ │ -
123 bool isContinuous() const { return isContinuous_; }
│ │ │ -
124
│ │ │ -
126 bool isHybrid() const { return isHybrid_; }
│ │ │ -
127
│ │ │ -
129 size_t nrContinuous() const { return continuousKeys_.size(); }
│ │ │ -
130
│ │ │ -
132 const DiscreteKeys &discreteKeys() const { return discreteKeys_; }
│ │ │ -
133
│ │ │ -
135 const KeyVector &continuousKeys() const { return continuousKeys_; }
│ │ │ -
136
│ │ │ +
│ │ │ +
69 void push_back(boost::shared_ptr<HybridConditional> conditional) {
│ │ │ +
70 factors_.push_back(conditional);
│ │ │ +
71 }
│ │ │ +
│ │ │ +
72
│ │ │ +
81 template <class Conditional>
│ │ │ +
│ │ │ +
82 void emplace_back(Conditional *conditional) {
│ │ │ +
83 factors_.push_back(boost::make_shared<HybridConditional>(
│ │ │ +
84 boost::shared_ptr<Conditional>(conditional)));
│ │ │ +
85 }
│ │ │ +
│ │ │ +
86
│ │ │ +
│ │ │ +
99 void push_back(HybridConditional &&conditional) {
│ │ │ +
100 factors_.push_back(
│ │ │ +
101 boost::make_shared<HybridConditional>(std::move(conditional)));
│ │ │ +
102 }
│ │ │ +
│ │ │ +
103
│ │ │ +
111 GaussianBayesNet choose(const DiscreteValues &assignment) const;
│ │ │ +
112
│ │ │ +
114 double evaluate(const HybridValues &values) const;
│ │ │ +
115
│ │ │ +
│ │ │ +
117 double operator()(const HybridValues &values) const {
│ │ │ +
118 return evaluate(values);
│ │ │ +
119 }
│ │ │ +
│ │ │ +
120
│ │ │ +
128 HybridValues optimize() const;
│ │ │ +
129
│ │ │ +
137 VectorValues optimize(const DiscreteValues &assignment) const;
│ │ │
138
│ │ │ -
139 private:
│ │ │ -
141 friend class boost::serialization::access;
│ │ │ -
142 template <class ARCHIVE>
│ │ │ -
143 void serialize(ARCHIVE &ar, const unsigned int /*version*/) {
│ │ │ -
144 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
145 ar &BOOST_SERIALIZATION_NVP(isDiscrete_);
│ │ │ -
146 ar &BOOST_SERIALIZATION_NVP(isContinuous_);
│ │ │ -
147 ar &BOOST_SERIALIZATION_NVP(isHybrid_);
│ │ │ -
148 ar &BOOST_SERIALIZATION_NVP(discreteKeys_);
│ │ │ -
149 ar &BOOST_SERIALIZATION_NVP(continuousKeys_);
│ │ │ -
150 }
│ │ │ -
151};
│ │ │ -
│ │ │ -
152// HybridFactor
│ │ │ -
153
│ │ │ -
154// traits
│ │ │ -
155template <>
│ │ │ -
156struct traits<HybridFactor> : public Testable<HybridFactor> {};
│ │ │ -
157
│ │ │ -
158} // namespace gtsam
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
specialized key for discrete variables
│ │ │ -
Decision Tree for use in DiscreteFactors.
│ │ │ -
The base class for all factors.
│ │ │ -
Linear Factor Graph where all factors are Gaussians.
│ │ │ -
A non-templated config holding any types of Manifold-group elements.
│ │ │ +
144 DecisionTreeFactor::shared_ptr discreteConditionals() const;
│ │ │ +
145
│ │ │ +
158 HybridValues sample(const HybridValues &given, std::mt19937_64 *rng) const;
│ │ │ +
159
│ │ │ +
170 HybridValues sample(std::mt19937_64 *rng) const;
│ │ │ +
171
│ │ │ +
178 HybridValues sample(const HybridValues &given) const;
│ │ │ +
179
│ │ │ +
185 HybridValues sample() const;
│ │ │ +
186
│ │ │ +
188 HybridBayesNet prune(size_t maxNrLeaves);
│ │ │ +
189
│ │ │ +
197 AlgebraicDecisionTree<Key> logProbability(
│ │ │ +
198 const VectorValues &continuousValues) const;
│ │ │ +
199
│ │ │ +
200 using BayesNet::logProbability; // expose HybridValues version
│ │ │ +
201
│ │ │ + │ │ │ +
213 const VectorValues &continuousValues) const;
│ │ │ +
214
│ │ │ +
219 HybridGaussianFactorGraph toFactorGraph(
│ │ │ +
220 const VectorValues &measurements) const;
│ │ │ +
222
│ │ │ +
223 private:
│ │ │ +
229 void updateDiscreteConditionals(const DecisionTreeFactor &prunedDecisionTree);
│ │ │ +
230
│ │ │ +
232 friend class boost::serialization::access;
│ │ │ +
233 template <class ARCHIVE>
│ │ │ +
234 void serialize(ARCHIVE &ar, const unsigned int /*version*/) {
│ │ │ +
235 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
236 }
│ │ │ +
237};
│ │ │ +
│ │ │ +
238
│ │ │ +
240template <>
│ │ │ +
241struct traits<HybridBayesNet> : public Testable<HybridBayesNet> {};
│ │ │ +
242
│ │ │ +
243} // namespace gtsam
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
Bayes network.
│ │ │ +
Chordal Bayes Net, the result of eliminating a factor graph.
│ │ │ +
Included from all GTSAM files.
│ │ │
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
│ │ │ +
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │
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
│ │ │
Template to create a binary predicate.
Definition Testable.h:111
│ │ │
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ -
a decision tree is a function from assignments to values.
Definition DecisionTree.h:61
│ │ │ -
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ -
Base class for truly hybrid probabilistic factors.
Definition HybridFactor.h:52
│ │ │ -
size_t nrContinuous() const
Return the number of continuous variables in this factor.
Definition HybridFactor.h:129
│ │ │ -
HybridFactor This
This class.
Definition HybridFactor.h:66
│ │ │ -
boost::shared_ptr< HybridFactor > shared_ptr
shared_ptr to this class
Definition HybridFactor.h:68
│ │ │ -
bool isDiscrete() const
True if this is a factor of discrete variables only.
Definition HybridFactor.h:120
│ │ │ -
bool isHybrid() const
True is this is a Discrete-Continuous factor.
Definition HybridFactor.h:126
│ │ │ -
HybridFactor()=default
Default constructor creates empty factor.
│ │ │ -
Factor Base
Our base class.
Definition HybridFactor.h:69
│ │ │ -
const KeyVector & continuousKeys() const
Return only the continuous keys for this factor.
Definition HybridFactor.h:135
│ │ │ -
bool isContinuous() const
True if this is a factor of continuous variables only.
Definition HybridFactor.h:123
│ │ │ -
KeyVector continuousKeys_
Record continuous keys for book-keeping.
Definition HybridFactor.h:62
│ │ │ -
virtual ~HybridFactor()=default
Virtual destructor.
│ │ │ -
const DiscreteKeys & discreteKeys() const
Return the discrete keys for this factor.
Definition HybridFactor.h:132
│ │ │ -
Definition Factor.h:68
│ │ │ -
the error.
│ │ │ +
An algebraic decision tree fixes the range of a DecisionTree to double.
Definition AlgebraicDecisionTree.h:38
│ │ │ +
A discrete probabilistic factor.
Definition DecisionTreeFactor.h:45
│ │ │ +
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ +
A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals,...
Definition HybridBayesNet.h:35
│ │ │ +
void push_back(boost::shared_ptr< HybridConditional > conditional)
Add a hybrid conditional using a shared_ptr.
Definition HybridBayesNet.h:69
│ │ │ +
void emplace_back(Conditional *conditional)
Preferred: add a conditional directly using a pointer.
Definition HybridBayesNet.h:82
│ │ │ +
void push_back(HybridConditional &&conditional)
Add a conditional using a shared_ptr, using implicit conversion to a HybridConditional.
Definition HybridBayesNet.h:99
│ │ │ +
HybridBayesNet()=default
Construct empty Bayes net.
│ │ │ +
double operator()(const HybridValues &values) const
Evaluate hybrid probability density for given HybridValues, sugar.
Definition HybridBayesNet.h:117
│ │ │ +
Hybrid Conditional Density.
Definition HybridConditional.h:62
│ │ │ +
Definition HybridGaussianFactorGraph.h:102
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ +
Definition Conditional.h:64
│ │ │ +
GaussianBayesNet is a Bayes net made from linear-Gaussian conditionals.
Definition GaussianBayesNet.h:36
│ │ │ +
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,139 +1,135 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridFactor.h │ │ │ │ +HybridBayesNet.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 * ------------------------------------------------------------------------- │ │ │ │ +2 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ +3 * Atlanta, Georgia 30332-0415 │ │ │ │ +4 * All Rights Reserved │ │ │ │ +5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ +6 * See LICENSE for the license information │ │ │ │ +7 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ -11 │ │ │ │ +8 │ │ │ │ 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_/_d_i_s_c_r_e_t_e_/_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_K_e_y_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_F_a_c_t_o_r_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_n_o_n_l_i_n_e_a_r_/_V_a_l_u_e_s_._h> │ │ │ │ +20#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> │ │ │ │ +21#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_V_a_l_u_e_s_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t_._h> │ │ │ │ 26 │ │ │ │ -27#include │ │ │ │ -28#include │ │ │ │ -29namespace _g_t_s_a_m { │ │ │ │ -30 │ │ │ │ -31class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ -32 │ │ │ │ -_3_4using _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e = _D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_,_ _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_>; │ │ │ │ -35 │ │ │ │ -36_K_e_y_V_e_c_t_o_r CollectKeys(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ -37 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys); │ │ │ │ -38_K_e_y_V_e_c_t_o_r CollectKeys(const _K_e_y_V_e_c_t_o_r &keys1, const _K_e_y_V_e_c_t_o_r &keys2); │ │ │ │ -39_D_i_s_c_r_e_t_e_K_e_y_s CollectDiscreteKeys(const _D_i_s_c_r_e_t_e_K_e_y_s &key1, │ │ │ │ -40 const _D_i_s_c_r_e_t_e_K_e_y_s &key2); │ │ │ │ -41 │ │ │ │ -_5_2class GTSAM_EXPORT _H_y_b_r_i_d_F_a_c_t_o_r : public _F_a_c_t_o_r { │ │ │ │ -53 private: │ │ │ │ -54 bool isDiscrete_ = false; │ │ │ │ -55 bool isContinuous_ = false; │ │ │ │ -56 bool isHybrid_ = false; │ │ │ │ -57 │ │ │ │ -58 protected: │ │ │ │ -59 // Set of DiscreteKeys for this factor. │ │ │ │ -60 _D_i_s_c_r_e_t_e_K_e_y_s discreteKeys_; │ │ │ │ -_6_2 _K_e_y_V_e_c_t_o_r _c_o_n_t_i_n_u_o_u_s_K_e_y_s__; │ │ │ │ +27namespace _g_t_s_a_m { │ │ │ │ +28 │ │ │ │ +_3_5class GTSAM_EXPORT _H_y_b_r_i_d_B_a_y_e_s_N_e_t : public _B_a_y_e_s_N_e_t { │ │ │ │ +36 public: │ │ │ │ +37 using _B_a_s_e = _B_a_y_e_s_N_e_t_<_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_>; │ │ │ │ +38 using _T_h_i_s = _H_y_b_r_i_d_B_a_y_e_s_N_e_t; │ │ │ │ +39 using _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e = _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ +40 using shared_ptr = boost::shared_ptr; │ │ │ │ +41 using sharedConditional = boost::shared_ptr; │ │ │ │ +42 │ │ │ │ +45 │ │ │ │ +_4_7 _H_y_b_r_i_d_B_a_y_e_s_N_e_t() = default; │ │ │ │ +48 │ │ │ │ +52 │ │ │ │ +54 void _p_r_i_n_t(const std::string &s = "", const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = │ │ │ │ +55 DefaultKeyFormatter) const override; │ │ │ │ +56 │ │ │ │ +58 bool _e_q_u_a_l_s(const _T_h_i_s &fg, double tol = 1e-9) const; │ │ │ │ +59 │ │ │ │ 63 │ │ │ │ -64 public: │ │ │ │ -65 // typedefs needed to play nice with gtsam │ │ │ │ -_6_6 typedef _H_y_b_r_i_d_F_a_c_t_o_r _T_h_i_s; │ │ │ │ -67 typedef boost::shared_ptr │ │ │ │ -_6_8 _s_h_a_r_e_d___p_t_r; │ │ │ │ -_6_9 typedef _F_a_c_t_o_r _B_a_s_e; │ │ │ │ -70 │ │ │ │ -73 │ │ │ │ -_7_5 _H_y_b_r_i_d_F_a_c_t_o_r() = default; │ │ │ │ -76 │ │ │ │ -82 explicit _H_y_b_r_i_d_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &keys); │ │ │ │ -83 │ │ │ │ -89 explicit _H_y_b_r_i_d_F_a_c_t_o_r(const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys); │ │ │ │ -90 │ │ │ │ -97 _H_y_b_r_i_d_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ -98 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys); │ │ │ │ -99 │ │ │ │ -_1_0_1 virtual _~_H_y_b_r_i_d_F_a_c_t_o_r() = default; │ │ │ │ -102 │ │ │ │ -106 │ │ │ │ -108 virtual bool _e_q_u_a_l_s(const _H_y_b_r_i_d_F_a_c_t_o_r &lf, double tol = 1e-9) const; │ │ │ │ -109 │ │ │ │ -111 void _p_r_i_n_t( │ │ │ │ -112 const std::string &s = "HybridFactor\n", │ │ │ │ -113 const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = DefaultKeyFormatter) const override; │ │ │ │ -114 │ │ │ │ -118 │ │ │ │ -_1_2_0 bool _i_s_D_i_s_c_r_e_t_e() const { return isDiscrete_; } │ │ │ │ -121 │ │ │ │ -_1_2_3 bool _i_s_C_o_n_t_i_n_u_o_u_s() const { return isContinuous_; } │ │ │ │ -124 │ │ │ │ -_1_2_6 bool _i_s_H_y_b_r_i_d() const { return isHybrid_; } │ │ │ │ -127 │ │ │ │ -_1_2_9 size_t _n_r_C_o_n_t_i_n_u_o_u_s() const { return continuousKeys_.size(); } │ │ │ │ -130 │ │ │ │ -_1_3_2 const _D_i_s_c_r_e_t_e_K_e_y_s &_d_i_s_c_r_e_t_e_K_e_y_s() const { return discreteKeys_; } │ │ │ │ -133 │ │ │ │ -_1_3_5 const _K_e_y_V_e_c_t_o_r &_c_o_n_t_i_n_u_o_u_s_K_e_y_s() const { return continuousKeys_; } │ │ │ │ -136 │ │ │ │ +_6_9 void _p_u_s_h___b_a_c_k(boost::shared_ptr conditional) { │ │ │ │ +70 factors_.push_back(conditional); │ │ │ │ +71 } │ │ │ │ +72 │ │ │ │ +81 template │ │ │ │ +_8_2 void _e_m_p_l_a_c_e___b_a_c_k(_C_o_n_d_i_t_i_o_n_a_l *conditional) { │ │ │ │ +83 factors_.push_back(boost::make_shared( │ │ │ │ +84 boost::shared_ptr(conditional))); │ │ │ │ +85 } │ │ │ │ +86 │ │ │ │ +_9_9 void _p_u_s_h___b_a_c_k(_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l &&conditional) { │ │ │ │ +100 factors_.push_back( │ │ │ │ +101 boost::make_shared(std::move(conditional))); │ │ │ │ +102 } │ │ │ │ +103 │ │ │ │ +111 _G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ +112 │ │ │ │ +114 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const; │ │ │ │ +115 │ │ │ │ +_1_1_7 double _o_p_e_r_a_t_o_r_(_)(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const { │ │ │ │ +118 return evaluate(values); │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +128 _H_y_b_r_i_d_V_a_l_u_e_s _o_p_t_i_m_i_z_e() const; │ │ │ │ +129 │ │ │ │ +137 _V_e_c_t_o_r_V_a_l_u_e_s _o_p_t_i_m_i_z_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ 138 │ │ │ │ -139 private: │ │ │ │ -_1_4_1 friend class boost::serialization::access; │ │ │ │ -142 template │ │ │ │ -143 void serialize(ARCHIVE &ar, const unsigned int /*version*/) { │ │ │ │ -144 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -145 ar &BOOST_SERIALIZATION_NVP(isDiscrete_); │ │ │ │ -146 ar &BOOST_SERIALIZATION_NVP(isContinuous_); │ │ │ │ -147 ar &BOOST_SERIALIZATION_NVP(isHybrid_); │ │ │ │ -148 ar &BOOST_SERIALIZATION_NVP(discreteKeys_); │ │ │ │ -149 ar &BOOST_SERIALIZATION_NVP(continuousKeys_); │ │ │ │ -150 } │ │ │ │ -151}; │ │ │ │ -152// HybridFactor │ │ │ │ -153 │ │ │ │ -154// traits │ │ │ │ -155template <> │ │ │ │ -_1_5_6struct _t_r_a_i_t_s<_H_y_b_r_i_d_F_a_c_t_o_r> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -157 │ │ │ │ -158} // namespace gtsam │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ -specialized key for discrete variables │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ -Decision Tree for use in DiscreteFactors. │ │ │ │ -_F_a_c_t_o_r_._h │ │ │ │ -The base class for all factors. │ │ │ │ -_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Linear Factor Graph where all factors are Gaussians. │ │ │ │ -_V_a_l_u_e_s_._h │ │ │ │ -A non-templated config holding any types of Manifold-group elements. │ │ │ │ +144 DecisionTreeFactor::shared_ptr discreteConditionals() const; │ │ │ │ +145 │ │ │ │ +158 _H_y_b_r_i_d_V_a_l_u_e_s sample(const _H_y_b_r_i_d_V_a_l_u_e_s &given, std::mt19937_64 *rng) const; │ │ │ │ +159 │ │ │ │ +170 _H_y_b_r_i_d_V_a_l_u_e_s sample(std::mt19937_64 *rng) const; │ │ │ │ +171 │ │ │ │ +178 _H_y_b_r_i_d_V_a_l_u_e_s sample(const _H_y_b_r_i_d_V_a_l_u_e_s &given) const; │ │ │ │ +179 │ │ │ │ +185 _H_y_b_r_i_d_V_a_l_u_e_s sample() const; │ │ │ │ +186 │ │ │ │ +188 _H_y_b_r_i_d_B_a_y_e_s_N_e_t prune(size_t maxNrLeaves); │ │ │ │ +189 │ │ │ │ +197 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> logProbability( │ │ │ │ +198 const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) const; │ │ │ │ +199 │ │ │ │ +200 using BayesNet::logProbability; // expose HybridValues version │ │ │ │ +201 │ │ │ │ +212 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> evaluate( │ │ │ │ +213 const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) const; │ │ │ │ +214 │ │ │ │ +219 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h toFactorGraph( │ │ │ │ +220 const _V_e_c_t_o_r_V_a_l_u_e_s &measurements) const; │ │ │ │ +222 │ │ │ │ +223 private: │ │ │ │ +229 void updateDiscreteConditionals(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ +&prunedDecisionTree); │ │ │ │ +230 │ │ │ │ +_2_3_2 friend class boost::serialization::access; │ │ │ │ +233 template │ │ │ │ +234 void serialize(ARCHIVE &ar, const unsigned int /*version*/) { │ │ │ │ +235 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ +236 } │ │ │ │ +237}; │ │ │ │ +238 │ │ │ │ +240template <> │ │ │ │ +_2_4_1struct _t_r_a_i_t_s<_H_y_b_r_i_d_B_a_y_e_s_N_e_t> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ +242 │ │ │ │ +243} // namespace gtsam │ │ │ │ +_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ +_H_y_b_r_i_d_V_a_l_u_e_s_._h │ │ │ │ +_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +_B_a_y_e_s_N_e_t_._h │ │ │ │ +Bayes network. │ │ │ │ +_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t_._h │ │ │ │ +Chordal Bayes Net, the result of eliminating a factor graph. │ │ │ │ +_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_:_:_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_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_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. │ │ │ │ @@ -144,70 +140,64 @@ │ │ │ │ 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_:_:_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_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_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -Base class for truly hybrid probabilistic factors. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:52 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_n_r_C_o_n_t_i_n_u_o_u_s │ │ │ │ -size_t nrContinuous() const │ │ │ │ -Return the number of continuous variables in this factor. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:129 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_T_h_i_s │ │ │ │ -HybridFactor This │ │ │ │ -This class. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:66 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ -boost::shared_ptr< HybridFactor > shared_ptr │ │ │ │ -shared_ptr to this class │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:68 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_i_s_D_i_s_c_r_e_t_e │ │ │ │ -bool isDiscrete() const │ │ │ │ -True if this is a factor of discrete variables only. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:120 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_i_s_H_y_b_r_i_d │ │ │ │ -bool isHybrid() const │ │ │ │ -True is this is a Discrete-Continuous factor. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:126 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -HybridFactor()=default │ │ │ │ -Default constructor creates empty factor. │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_B_a_s_e │ │ │ │ -Factor Base │ │ │ │ -Our base class. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:69 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_c_o_n_t_i_n_u_o_u_s_K_e_y_s │ │ │ │ -const KeyVector & continuousKeys() const │ │ │ │ -Return only the continuous keys for this factor. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:135 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_i_s_C_o_n_t_i_n_u_o_u_s │ │ │ │ -bool isContinuous() const │ │ │ │ -True if this is a factor of continuous variables only. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:123 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_c_o_n_t_i_n_u_o_u_s_K_e_y_s__ │ │ │ │ -KeyVector continuousKeys_ │ │ │ │ -Record continuous keys for book-keeping. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:62 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_~_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -virtual ~HybridFactor()=default │ │ │ │ -Virtual destructor. │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_:_:_d_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ -const DiscreteKeys & discreteKeys() const │ │ │ │ -Return the discrete keys for this factor. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:132 │ │ │ │ -_g_t_s_a_m_:_:_F_a_c_t_o_r │ │ │ │ -DDeeffiinniittiioonn Factor.h:68 │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -the error. │ │ │ │ +_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_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_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +A hybrid Bayes net is a collection of HybridConditionals, which can have │ │ │ │ +discrete conditionals,... │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_p_u_s_h___b_a_c_k │ │ │ │ +void push_back(boost::shared_ptr< HybridConditional > conditional) │ │ │ │ +Add a hybrid conditional using a shared_ptr. │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:69 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_e_m_p_l_a_c_e___b_a_c_k │ │ │ │ +void emplace_back(Conditional *conditional) │ │ │ │ +Preferred: add a conditional directly using a pointer. │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:82 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_p_u_s_h___b_a_c_k │ │ │ │ +void push_back(HybridConditional &&conditional) │ │ │ │ +Add a conditional using a shared_ptr, using implicit conversion to a │ │ │ │ +HybridConditional. │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:99 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +HybridBayesNet()=default │ │ │ │ +Construct empty Bayes net. │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ +double operator()(const HybridValues &values) const │ │ │ │ +Evaluate hybrid probability density for given HybridValues, sugar. │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:117 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +Hybrid Conditional Density. │ │ │ │ +DDeeffiinniittiioonn HybridConditional.h:62 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:102 │ │ │ │ +_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_:_:_B_a_y_e_s_N_e_t │ │ │ │ +A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ +DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t │ │ │ │ +GaussianBayesNet is a Bayes net made from linear-Gaussian conditionals. │ │ │ │ +DDeeffiinniittiioonn GaussianBayesNet.h:36 │ │ │ │ +_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +VectorValues represents a collection of vector-valued variables associated each │ │ │ │ +with a unique integer... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00533.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactor.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/MixtureFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,45 +94,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
HybridFactor.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
MixtureFactor.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Nonlinear Mixture factor of continuous and discrete. │ │ │ +More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::MixtureFactor
 Implementation of a discrete conditional mixture factor. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

│ │ │ -KeyVector gtsam::CollectKeys (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
 
│ │ │ -KeyVector gtsam::CollectKeys (const KeyVector &keys1, const KeyVector &keys2)
 
│ │ │ -DiscreteKeys gtsam::CollectDiscreteKeys (const DiscreteKeys &key1, const DiscreteKeys &key2)
 
│ │ │

Detailed Description

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ +

Nonlinear Mixture factor of continuous and discrete.

│ │ │ +
Author
Kevin Doherty, kdohe.nosp@m.rty@.nosp@m.mit.e.nosp@m.du
│ │ │ +
│ │ │ +Varun Agrawal
│ │ │ +
Date
December 2021
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +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 │ │ │ │ -HybridFactor.cpp File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +MixtureFactor.h File Reference │ │ │ │ +Nonlinear Mixture factor of continuous and discrete. _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_:_:_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ +  Implementation of a discrete conditional mixture factor. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ - _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &continuousKeys, const │ │ │ │ - _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys) │ │ │ │ -  │ │ │ │ - _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &keys1, const _K_e_y_V_e_c_t_o_r │ │ │ │ - &keys2) │ │ │ │ -  │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::CCoolllleeccttDDiissccrreetteeKKeeyyss (const _D_i_s_c_r_e_t_e_K_e_y_s &key1, const │ │ │ │ - _D_i_s_c_r_e_t_e_K_e_y_s &key2) │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Date │ │ │ │ - Mar 11, 2022 │ │ │ │ +Nonlinear Mixture factor of continuous and discrete. │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ + Kevin Doherty, _k_d_o_h_e_._n_o_s_p_@_m_._r_t_y_@_._n_o_s_p_@_m_._m_i_t_._e_._n_o_s_p_@_m_._d_u │ │ │ │ + Varun Agrawal │ │ │ │ + Date │ │ │ │ + December 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_F_a_c_t_o_r_._c_p_p │ │ │ │ + * _M_i_x_t_u_r_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/a00536.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridEliminationTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianFactorGraph.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,40 +95,55 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
HybridEliminationTree.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
HybridGaussianFactorGraph.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ +

Linearized Hybrid factor graph that uses type erasure. │ │ │ +More...

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridEliminationTree
 Elimination Tree type for Hybrid Factor Graphs. More...
struct  gtsam::EliminationTraits< HybridGaussianFactorGraph >
 
class  gtsam::HybridGaussianFactorGraph
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

std::pair< HybridConditional::shared_ptr, boost::shared_ptr< Factor > > gtsam::EliminateHybrid (const HybridGaussianFactorGraph &factors, const Ordering &keys)
 Main elimination function for HybridGaussianFactorGraph.
 
const Ordering gtsam::HybridOrdering (const HybridGaussianFactorGraph &graph)
 Return a Colamd constrained ordering where the discrete keys are eliminated after the continuous keys.
 
│ │ │

Detailed Description

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ +

Linearized Hybrid factor graph that uses type erasure.

│ │ │ +
Author
Fan Jiang, Varun Agrawal, Frank Dellaert
│ │ │ +
Date
Mar 11, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +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 │ │ │ │ -HybridEliminationTree.h 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 │ │ │ │ +HybridGaussianFactorGraph.h File Reference │ │ │ │ +Linearized Hybrid factor graph that uses type erasure. _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_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ -  Elimination Tree type for Hybrid _F_a_c_t_o_r Graphs. _M_o_r_e_._._. │ │ │ │ +struct   _g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + std::pair< _H_y_b_r_i_d_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_H_y_b_r_i_d (const │ │ │ │ +_s_h_a_r_e_d___p_t_r, boost::shared_ptr< _F_a_c_t_o_r > _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &factors, │ │ │ │ + >  const _O_r_d_e_r_i_n_g &keys) │ │ │ │ +  Main elimination function for │ │ │ │ + _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h. │ │ │ │ +  │ │ │ │ + const _O_r_d_e_r_i_n_g  _g_t_s_a_m_:_:_H_y_b_r_i_d_O_r_d_e_r_i_n_g (const │ │ │ │ + _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h &graph) │ │ │ │ + Return a Colamd constrained ordering │ │ │ │ +  where the discrete keys are eliminated │ │ │ │ + after the continuous keys. │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Linearized Hybrid factor graph that uses type erasure. │ │ │ │ + Author │ │ │ │ + Fan Jiang, Varun Agrawal, Frank Dellaert │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ - Author │ │ │ │ - Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_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/a00536_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridEliminationTree.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridGaussianFactorGraph.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,78 +98,192 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridEliminationTree.h
│ │ │ +
HybridGaussianFactorGraph.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
│ │ │ -
│ │ │ -
31class GTSAM_EXPORT HybridEliminationTree
│ │ │ -
32 : public EliminationTree<HybridBayesNet, HybridGaussianFactorGraph> {
│ │ │ -
33 private:
│ │ │ -
34 friend class ::EliminationTreeTester;
│ │ │ -
35
│ │ │ -
36 public:
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
40 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ -
41
│ │ │ -
44
│ │ │ - │ │ │ -
55 const VariableIndex& structure, const Ordering& order);
│ │ │ -
56
│ │ │ - │ │ │ -
63 const Ordering& order);
│ │ │ -
64
│ │ │ -
66
│ │ │ -
68 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ -
69};
│ │ │ -
│ │ │ -
70
│ │ │ -
71} // namespace gtsam
│ │ │ -
Linearized Hybrid factor graph that uses type erasure.
│ │ │ -
A Bayes net of Gaussian Conditionals indexed by discrete keys.
│ │ │ - │ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
32// Forward declarations
│ │ │ +
33class HybridGaussianFactorGraph;
│ │ │ +
34class HybridConditional;
│ │ │ +
35class HybridBayesNet;
│ │ │ +
36class HybridEliminationTree;
│ │ │ +
37class HybridBayesTree;
│ │ │ +
38class HybridJunctionTree;
│ │ │ +
39class DecisionTreeFactor;
│ │ │ +
40class JacobianFactor;
│ │ │ +
41class HybridValues;
│ │ │ +
42
│ │ │ +
51GTSAM_EXPORT
│ │ │ +
52std::pair<boost::shared_ptr<HybridConditional>, boost::shared_ptr<Factor>>
│ │ │ +
53EliminateHybrid(const HybridGaussianFactorGraph& factors, const Ordering& keys);
│ │ │ +
54
│ │ │ +
61GTSAM_EXPORT const Ordering
│ │ │ +
62HybridOrdering(const HybridGaussianFactorGraph& graph);
│ │ │ +
63
│ │ │ +
64/* ************************************************************************* */
│ │ │ +
65template <>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
71 typedef HybridConditional
│ │ │ + │ │ │ +
73 typedef HybridBayesNet
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
80 static std::pair<boost::shared_ptr<ConditionalType>,
│ │ │ +
81 boost::shared_ptr<FactorType>>
│ │ │ +
│ │ │ +
82 DefaultEliminate(const FactorGraphType& factors, const Ordering& keys) {
│ │ │ +
83 return EliminateHybrid(factors, keys);
│ │ │ +
84 }
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +
87 const FactorGraphType& graph,
│ │ │ +
88 boost::optional<const VariableIndex&> variableIndex) {
│ │ │ +
89 return HybridOrdering(graph);
│ │ │ +
90 }
│ │ │ +
│ │ │ +
91};
│ │ │ +
│ │ │ +
92
│ │ │ +
│ │ │ + │ │ │ +
101 : public HybridFactorGraph,
│ │ │ +
102 public EliminateableFactorGraph<HybridGaussianFactorGraph> {
│ │ │ +
103 protected:
│ │ │ +
105 template <typename FACTOR>
│ │ │ +
106 using IsGaussian = typename std::enable_if<
│ │ │ +
107 std::is_base_of<GaussianFactor, FACTOR>::value>::type;
│ │ │ +
108
│ │ │ +
109 public:
│ │ │ +
110 using Base = HybridFactorGraph;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
114 using shared_ptr = boost::shared_ptr<This>;
│ │ │ +
115
│ │ │ + │ │ │ + │ │ │ +
118
│ │ │ +
121
│ │ │ + │ │ │ +
124
│ │ │ +
130 template <class DERIVEDFACTOR>
│ │ │ +
│ │ │ + │ │ │ +
132 : Base(graph) {}
│ │ │ +
│ │ │ +
133
│ │ │ +
137
│ │ │ +
138 // TODO(dellaert): customize print and equals.
│ │ │ +
139 // void print(const std::string& s = "HybridGaussianFactorGraph",
│ │ │ +
140 // const KeyFormatter& keyFormatter = DefaultKeyFormatter) const
│ │ │ +
141 // override;
│ │ │ +
142 // bool equals(const This& fg, double tol = 1e-9) const override;
│ │ │ +
143
│ │ │ +
147
│ │ │ +
148 using Base::error; // Expose error(const HybridValues&) method..
│ │ │ +
149
│ │ │ +
159 AlgebraicDecisionTree<Key> error(const VectorValues& continuousValues) const;
│ │ │ +
160
│ │ │ + │ │ │ +
170 const VectorValues& continuousValues) const;
│ │ │ +
171
│ │ │ +
178 double probPrime(const HybridValues& values) const;
│ │ │ +
179
│ │ │ +
189 GaussianFactorGraphTree assembleGraphTree() const;
│ │ │ +
190
│ │ │ +
192};
│ │ │ +
│ │ │ +
193
│ │ │ +
194} // namespace gtsam
│ │ │ +
Factor graph with utilities for hybrid factors.
│ │ │ + │ │ │ +
A set of GaussianFactors, indexed by a set of discrete keys.
│ │ │ +
Variable ordering for the elimination algorithm.
│ │ │ +
Factor Graph Base Class.
│ │ │ +
Variable elimination algorithms for factor graphs.
│ │ │ +
A factor with a quadratic error function - a Gaussian.
│ │ │ +
Factor Graph Values.
│ │ │ +
std::pair< HybridConditional::shared_ptr, boost::shared_ptr< Factor > > EliminateHybrid(const HybridGaussianFactorGraph &factors, const Ordering &frontalKeys)
Main elimination function for HybridGaussianFactorGraph.
Definition HybridGaussianFactorGraph.cpp:320
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │ +
const Ordering HybridOrdering(const HybridGaussianFactorGraph &graph)
Return a Colamd constrained ordering where the discrete keys are eliminated after the continuous keys...
Definition HybridGaussianFactorGraph.cpp:72
│ │ │ +
An algebraic decision tree fixes the range of a DecisionTree to double.
Definition AlgebraicDecisionTree.h:38
│ │ │ +
a decision tree is a function from assignments to values.
Definition DecisionTree.h:61
│ │ │ +
A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals,...
Definition HybridBayesNet.h:35
│ │ │ +
A Bayes tree representing a Hybrid density.
Definition HybridBayesTree.h:64
│ │ │ +
Hybrid Conditional Density.
Definition HybridConditional.h:62
│ │ │
Elimination Tree type for Hybrid Factor Graphs.
Definition HybridEliminationTree.h:32
│ │ │ -
HybridEliminationTree This
This class.
Definition HybridEliminationTree.h:39
│ │ │ -
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
Definition HybridEliminationTree.h:40
│ │ │ -
EliminationTree< HybridBayesNet, HybridGaussianFactorGraph > Base
Base class.
Definition HybridEliminationTree.h:38
│ │ │ +
Hybrid Factor Graph Factor graph with utilities for hybrid factors.
Definition HybridFactorGraph.h:39
│ │ │ +
static std::pair< boost::shared_ptr< ConditionalType >, boost::shared_ptr< FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering &keys)
The default dense elimination function.
Definition HybridGaussianFactorGraph.h:82
│ │ │ +
HybridConditional ConditionalType
Type of conditionals from elimination.
Definition HybridGaussianFactorGraph.h:72
│ │ │ +
HybridGaussianFactorGraph FactorGraphType
Type of the factor graph (e.g.
Definition HybridGaussianFactorGraph.h:69
│ │ │ +
HybridJunctionTree JunctionTreeType
Type of Junction tree.
Definition HybridGaussianFactorGraph.h:78
│ │ │ +
HybridEliminationTree EliminationTreeType
Type of elimination tree.
Definition HybridGaussianFactorGraph.h:76
│ │ │ +
static Ordering DefaultOrderingFunc(const FactorGraphType &graph, boost::optional< const VariableIndex & > variableIndex)
The default ordering generation function.
Definition HybridGaussianFactorGraph.h:86
│ │ │ +
Factor FactorType
Type of factors in factor graph.
Definition HybridGaussianFactorGraph.h:67
│ │ │ +
HybridBayesTree BayesTreeType
Type of Bayes tree.
Definition HybridGaussianFactorGraph.h:77
│ │ │ +
HybridBayesNet BayesNetType
Type of Bayes net from sequential elimination.
Definition HybridGaussianFactorGraph.h:74
│ │ │
Definition HybridGaussianFactorGraph.h:102
│ │ │ -
An elimination tree is a data structure used intermediately during elimination.
Definition EliminationTree.h:52
│ │ │ +
boost::shared_ptr< This > shared_ptr
shared_ptr to This
Definition HybridGaussianFactorGraph.h:114
│ │ │ +
typename std::enable_if< std::is_base_of< GaussianFactor, FACTOR >::value >::type IsGaussian
Check if FACTOR type is derived from GaussianFactor.
Definition HybridGaussianFactorGraph.h:107
│ │ │ +
KeyVector Indices
map from keys to values
Definition HybridGaussianFactorGraph.h:117
│ │ │ +
EliminateableFactorGraph< This > BaseEliminateable
for elimination
Definition HybridGaussianFactorGraph.h:113
│ │ │ +
HybridGaussianFactorGraph()=default
Default constructor.
│ │ │ +
HybridGaussianFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph)
Implicit copy/downcast constructor to override explicit template container constructor.
Definition HybridGaussianFactorGraph.h:131
│ │ │ +
An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree,...
Definition HybridJunctionTree.h:53
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
Traits class for eliminateable factor graphs, specifies the types that result from elimination,...
Definition EliminateableFactorGraph.h:36
│ │ │ +
EliminateableFactorGraph is a base class for factor graphs that contains elimination algorithms.
Definition EliminateableFactorGraph.h:57
│ │ │ +
Definition Factor.h:68
│ │ │
Definition Ordering.h:34
│ │ │ -
The VariableIndex class computes and stores the block column structure of a factor graph.
Definition VariableIndex.h:43
│ │ │ +
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
│ │ │ +
the error.
│ │ │ +
In Gaussian factors, the error function returns either the negative log-likelihood,...
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,92 +1,287 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridEliminationTree.h │ │ │ │ +HybridGaussianFactorGraph.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_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -22#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> │ │ │ │ -23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -_3_1class GTSAM_EXPORT _H_y_b_r_i_d_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 private: │ │ │ │ -34 friend class ::EliminationTreeTester; │ │ │ │ -35 │ │ │ │ -36 public: │ │ │ │ -37 typedef _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_<_H_y_b_r_i_d_B_a_y_e_s_N_e_t_,_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ -_3_8 _B_a_s_e; │ │ │ │ -_3_9 typedef _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ -_4_0 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ -41 │ │ │ │ -44 │ │ │ │ -54 _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ -55 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); │ │ │ │ -56 │ │ │ │ -62 _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ -63 const _O_r_d_e_r_i_n_g& order); │ │ │ │ -64 │ │ │ │ -66 │ │ │ │ -68 bool _e_q_u_a_l_s(const _T_h_i_s& other, double tol = 1e-9) const; │ │ │ │ -69}; │ │ │ │ -70 │ │ │ │ -71} // namespace gtsam │ │ │ │ -_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Linearized Hybrid factor graph that uses type erasure. │ │ │ │ -_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ -A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ -_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_E_l_i_m_i_n_a_t_e_a_b_l_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_/_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +26#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_O_r_d_e_r_i_n_g_._h> │ │ │ │ +27#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h> │ │ │ │ +28#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> │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +32// Forward declarations │ │ │ │ +33class HybridGaussianFactorGraph; │ │ │ │ +34class HybridConditional; │ │ │ │ +35class HybridBayesNet; │ │ │ │ +36class HybridEliminationTree; │ │ │ │ +37class HybridBayesTree; │ │ │ │ +38class HybridJunctionTree; │ │ │ │ +39class DecisionTreeFactor; │ │ │ │ +40class _J_a_c_o_b_i_a_n_F_a_c_t_o_r; │ │ │ │ +41class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ +42 │ │ │ │ +51GTSAM_EXPORT │ │ │ │ +52std::pair, boost::shared_ptr> │ │ │ │ +53_E_l_i_m_i_n_a_t_e_H_y_b_r_i_d(const HybridGaussianFactorGraph& factors, const Ordering& │ │ │ │ +keys); │ │ │ │ +54 │ │ │ │ +61GTSAM_EXPORT const Ordering │ │ │ │ +62_H_y_b_r_i_d_O_r_d_e_r_i_n_g(const HybridGaussianFactorGraph& graph); │ │ │ │ +63 │ │ │ │ +64/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +65template <> │ │ │ │ +_6_6struct _E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s<_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h> { │ │ │ │ +_6_7 typedef _F_a_c_t_o_r _F_a_c_t_o_r_T_y_p_e; │ │ │ │ +68 typedef _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +_6_9 _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e; │ │ │ │ +71 typedef _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +_7_2 _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e; │ │ │ │ +73 typedef _H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +_7_4 _B_a_y_e_s_N_e_t_T_y_p_e; │ │ │ │ +75 typedef _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +_7_6 _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_T_y_p_e; │ │ │ │ +_7_7 typedef _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e _B_a_y_e_s_T_r_e_e_T_y_p_e; │ │ │ │ +_7_8 typedef _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e _J_u_n_c_t_i_o_n_T_r_e_e_T_y_p_e; │ │ │ │ +80 static std::pair, │ │ │ │ +81 boost::shared_ptr> │ │ │ │ +_8_2 _D_e_f_a_u_l_t_E_l_i_m_i_n_a_t_e(const _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e& factors, const _O_r_d_e_r_i_n_g& keys) { │ │ │ │ +83 return _E_l_i_m_i_n_a_t_e_H_y_b_r_i_d(factors, keys); │ │ │ │ +84 } │ │ │ │ +_8_6 static _O_r_d_e_r_i_n_g _D_e_f_a_u_l_t_O_r_d_e_r_i_n_g_F_u_n_c( │ │ │ │ +87 const _F_a_c_t_o_r_G_r_a_p_h_T_y_p_e& graph, │ │ │ │ +88 boost::optional variableIndex) { │ │ │ │ +89 return _H_y_b_r_i_d_O_r_d_e_r_i_n_g(graph); │ │ │ │ +90 } │ │ │ │ +91}; │ │ │ │ +92 │ │ │ │ +_1_0_0class GTSAM_EXPORT _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +101 : public _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h, │ │ │ │ +102 public _E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h { │ │ │ │ +103 protected: │ │ │ │ +105 template │ │ │ │ +_1_0_6 using _I_s_G_a_u_s_s_i_a_n = typename std::enable_if< │ │ │ │ +107 std::is_base_of::value>::type; │ │ │ │ +108 │ │ │ │ +109 public: │ │ │ │ +110 using _B_a_s_e = _H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h; │ │ │ │ +_1_1_1 using _T_h_i_s = _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h; │ │ │ │ +_1_1_2 using _B_a_s_e_E_l_i_m_i_n_a_t_e_a_b_l_e = │ │ │ │ +113 _E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_<_T_h_i_s_>; │ │ │ │ +_1_1_4 using _s_h_a_r_e_d___p_t_r = boost::shared_ptr; │ │ │ │ +115 │ │ │ │ +_1_1_6 using _V_a_l_u_e_s = _g_t_s_a_m_:_:_V_a_l_u_e_s; │ │ │ │ +_1_1_7 using _I_n_d_i_c_e_s = _K_e_y_V_e_c_t_o_r; │ │ │ │ +118 │ │ │ │ +121 │ │ │ │ +_1_2_3 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h() = default; │ │ │ │ +124 │ │ │ │ +130 template │ │ │ │ +_1_3_1 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h(const _F_a_c_t_o_r_G_r_a_p_h_<_D_E_R_I_V_E_D_F_A_C_T_O_R_>& graph) │ │ │ │ +132 : _B_a_s_e(graph) {} │ │ │ │ +133 │ │ │ │ +137 │ │ │ │ +138 // TODO(dellaert): customize print and equals. │ │ │ │ +139 // void print(const std::string& s = "HybridGaussianFactorGraph", │ │ │ │ +140 // const KeyFormatter& keyFormatter = DefaultKeyFormatter) const │ │ │ │ +141 // override; │ │ │ │ +142 // bool equals(const This& fg, double tol = 1e-9) const override; │ │ │ │ +143 │ │ │ │ +147 │ │ │ │ +148 using Base::error; // Expose error(const HybridValues&) method.. │ │ │ │ +149 │ │ │ │ +159 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> error(const _V_e_c_t_o_r_V_a_l_u_e_s& continuousValues) │ │ │ │ +const; │ │ │ │ +160 │ │ │ │ +169 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> probPrime( │ │ │ │ +170 const _V_e_c_t_o_r_V_a_l_u_e_s& continuousValues) const; │ │ │ │ +171 │ │ │ │ +178 double probPrime(const _H_y_b_r_i_d_V_a_l_u_e_s& values) const; │ │ │ │ +179 │ │ │ │ +189 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e assembleGraphTree() const; │ │ │ │ +190 │ │ │ │ +192}; │ │ │ │ +193 │ │ │ │ +194} // namespace gtsam │ │ │ │ +_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor graph with utilities for hybrid factors. │ │ │ │ +_H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ +_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h │ │ │ │ +A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ │ +_O_r_d_e_r_i_n_g_._h │ │ │ │ +Variable ordering for the elimination algorithm. │ │ │ │ +_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Factor Graph Base Class. │ │ │ │ +_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Variable elimination algorithms for factor graphs. │ │ │ │ +_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h │ │ │ │ +A factor with a quadratic error function - a Gaussian. │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s_._h │ │ │ │ +Factor Graph Values. │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_H_y_b_r_i_d │ │ │ │ +std::pair< HybridConditional::shared_ptr, boost::shared_ptr< Factor > > │ │ │ │ +EliminateHybrid(const HybridGaussianFactorGraph &factors, const Ordering │ │ │ │ +&frontalKeys) │ │ │ │ +Main elimination function for HybridGaussianFactorGraph. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.cpp:320 │ │ │ │ _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_:_:_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_:_:_H_y_b_r_i_d_O_r_d_e_r_i_n_g │ │ │ │ +const Ordering HybridOrdering(const HybridGaussianFactorGraph &graph) │ │ │ │ +Return a Colamd constrained ordering where the discrete keys are eliminated │ │ │ │ +after the continuous keys... │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.cpp:72 │ │ │ │ +_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 │ │ │ │ +a decision tree is a function from assignments to values. │ │ │ │ +DDeeffiinniittiioonn DecisionTree.h:61 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ +A hybrid Bayes net is a collection of HybridConditionals, which can have │ │ │ │ +discrete conditionals,... │ │ │ │ +DDeeffiinniittiioonn HybridBayesNet.h:35 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ +A Bayes tree representing a Hybrid density. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.h:64 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ +Hybrid Conditional Density. │ │ │ │ +DDeeffiinniittiioonn HybridConditional.h:62 │ │ │ │ _g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ Elimination Tree type for Hybrid Factor Graphs. │ │ │ │ DDeeffiinniittiioonn HybridEliminationTree.h:32 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ -HybridEliminationTree This │ │ │ │ -This class. │ │ │ │ -DDeeffiinniittiioonn HybridEliminationTree.h:39 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridEliminationTree.h:40 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ -EliminationTree< HybridBayesNet, HybridGaussianFactorGraph > Base │ │ │ │ -Base class. │ │ │ │ -DDeeffiinniittiioonn HybridEliminationTree.h:38 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +Hybrid Factor Graph Factor graph with utilities for hybrid factors. │ │ │ │ +DDeeffiinniittiioonn HybridFactorGraph.h:39 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_D_e_f_a_u_l_t_E_l_i_m_i_n_a_t_e │ │ │ │ +static std::pair< boost::shared_ptr< ConditionalType >, boost::shared_ptr< │ │ │ │ +FactorType > > DefaultEliminate(const FactorGraphType &factors, const Ordering │ │ │ │ +&keys) │ │ │ │ +The default dense elimination function. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:82 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_C_o_n_d_i_t_i_o_n_a_l_T_y_p_e │ │ │ │ +HybridConditional ConditionalType │ │ │ │ +Type of conditionals from elimination. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:72 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_F_a_c_t_o_r_G_r_a_p_h_T_y_p_e │ │ │ │ +HybridGaussianFactorGraph FactorGraphType │ │ │ │ +Type of the factor graph (e.g. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:69 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_J_u_n_c_t_i_o_n_T_r_e_e_T_y_p_e │ │ │ │ +HybridJunctionTree JunctionTreeType │ │ │ │ +Type of Junction tree. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:78 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_T_y_p_e │ │ │ │ +HybridEliminationTree EliminationTreeType │ │ │ │ +Type of elimination tree. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:76 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_D_e_f_a_u_l_t_O_r_d_e_r_i_n_g_F_u_n_c │ │ │ │ +static Ordering DefaultOrderingFunc(const FactorGraphType &graph, boost:: │ │ │ │ +optional< const VariableIndex & > variableIndex) │ │ │ │ +The default ordering generation function. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:86 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_F_a_c_t_o_r_T_y_p_e │ │ │ │ +Factor FactorType │ │ │ │ +Type of factors in factor graph. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:67 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_B_a_y_e_s_T_r_e_e_T_y_p_e │ │ │ │ +HybridBayesTree BayesTreeType │ │ │ │ +Type of Bayes tree. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:77 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_B_a_y_e_s_N_e_t_T_y_p_e │ │ │ │ +HybridBayesNet BayesNetType │ │ │ │ +Type of Bayes net from sequential elimination. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:74 │ │ │ │ _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ DDeeffiinniittiioonn HybridGaussianFactorGraph.h:102 │ │ │ │ -_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_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +boost::shared_ptr< This > shared_ptr │ │ │ │ +shared_ptr to This │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:114 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_I_s_G_a_u_s_s_i_a_n │ │ │ │ +typename std::enable_if< std::is_base_of< GaussianFactor, FACTOR >::value >:: │ │ │ │ +type IsGaussian │ │ │ │ +Check if FACTOR type is derived from GaussianFactor. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:107 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_I_n_d_i_c_e_s │ │ │ │ +KeyVector Indices │ │ │ │ +map from keys to values │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:117 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_B_a_s_e_E_l_i_m_i_n_a_t_e_a_b_l_e │ │ │ │ +EliminateableFactorGraph< This > BaseEliminateable │ │ │ │ +for elimination │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:113 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +HybridGaussianFactorGraph()=default │ │ │ │ +Default constructor. │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +HybridGaussianFactorGraph(const FactorGraph< DERIVEDFACTOR > &graph) │ │ │ │ +Implicit copy/downcast constructor to override explicit template container │ │ │ │ +constructor. │ │ │ │ +DDeeffiinniittiioonn HybridGaussianFactorGraph.h:131 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridJunctionTree.h:53 │ │ │ │ +_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_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ +nodes. │ │ │ │ +DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_i_o_n_T_r_a_i_t_s │ │ │ │ +Traits class for eliminateable factor graphs, specifies the types that result │ │ │ │ +from elimination,... │ │ │ │ +DDeeffiinniittiioonn EliminateableFactorGraph.h:36 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +EliminateableFactorGraph is a base class for factor graphs that contains │ │ │ │ +elimination algorithms. │ │ │ │ +DDeeffiinniittiioonn EliminateableFactorGraph.h:57 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r │ │ │ │ +DDeeffiinniittiioonn Factor.h:68 │ │ │ │ _g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ -_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_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +VectorValues represents a collection of vector-valued variables associated each │ │ │ │ +with a unique integer... │ │ │ │ +DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_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 │ │ │ │ +_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ +the error. │ │ │ │ +_J_a_c_o_b_i_a_n_F_a_c_t_o_r │ │ │ │ +In Gaussian factors, the error function returns either the negative log- │ │ │ │ +likelihood,... │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_._h │ │ │ │ + * _H_y_b_r_i_d_G_a_u_s_s_i_a_n_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/a00542.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridConditional.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,26 +96,24 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
HybridConditional.h File Reference
│ │ │ +
HybridJunctionTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridConditional
 Hybrid Conditional Density. More...
 
struct  gtsam::traits< HybridConditional >
class  gtsam::HybridJunctionTree
 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...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -124,13 +122,13 @@ │ │ │
Date
Mar 11, 2022
│ │ │
Author
Fan Jiang
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +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 │ │ │ │ -HybridConditional.h File Reference │ │ │ │ +HybridJunctionTree.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_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -  Hybrid _C_o_n_d_i_t_i_o_n_a_l Density. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_H_y_b_r_i_d_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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00542_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridConditional.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridJunctionTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,15 +98,15 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridConditional.h
│ │ │ +
HybridJunctionTree.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,190 +114,52 @@ │ │ │
7
│ │ │
8 * See LICENSE for the license information
│ │ │
9
│ │ │
10 * -------------------------------------------------------------------------- */
│ │ │
11
│ │ │
18#pragma once
│ │ │
19
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
25#include <gtsam/inference/Key.h>
│ │ │ - │ │ │ -
27
│ │ │ -
28#include <boost/make_shared.hpp>
│ │ │ -
29#include <boost/shared_ptr.hpp>
│ │ │ -
30#include <stdexcept>
│ │ │ -
31#include <string>
│ │ │ -
32#include <typeinfo>
│ │ │ -
33#include <vector>
│ │ │ -
34
│ │ │ -
35namespace gtsam {
│ │ │ -
36
│ │ │ -
│ │ │ -
60class GTSAM_EXPORT HybridConditional
│ │ │ -
61 : public HybridFactor,
│ │ │ -
62 public Conditional<HybridFactor, HybridConditional> {
│ │ │ -
63 public:
│ │ │ -
64 // typedefs needed to play nice with gtsam
│ │ │ - │ │ │ -
66 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
70
│ │ │ -
71 protected:
│ │ │ -
73 boost::shared_ptr<Factor> inner_;
│ │ │ -
74
│ │ │ -
75 public:
│ │ │ -
78
│ │ │ -
80 HybridConditional() = default;
│ │ │ -
81
│ │ │ -
│ │ │ -
89 HybridConditional(const KeyVector& continuousKeys,
│ │ │ -
90 const DiscreteKeys& discreteKeys, size_t nFrontals)
│ │ │ -
91 : BaseFactor(continuousKeys, discreteKeys), BaseConditional(nFrontals) {}
│ │ │ -
│ │ │ -
92
│ │ │ -
102 HybridConditional(const KeyVector& continuousFrontals,
│ │ │ -
103 const DiscreteKeys& discreteFrontals,
│ │ │ -
104 const KeyVector& continuousParents,
│ │ │ -
105 const DiscreteKeys& discreteParents);
│ │ │ -
106
│ │ │ - │ │ │ -
114 const boost::shared_ptr<GaussianConditional>& continuousConditional);
│ │ │ -
115
│ │ │ - │ │ │ -
123 const boost::shared_ptr<DiscreteConditional>& discreteConditional);
│ │ │ -
124
│ │ │ -
131 HybridConditional(const boost::shared_ptr<GaussianMixture>& gaussianMixture);
│ │ │ -
132
│ │ │ -
136
│ │ │ -
138 void print(
│ │ │ -
139 const std::string& s = "Hybrid Conditional: ",
│ │ │ -
140 const KeyFormatter& formatter = DefaultKeyFormatter) const override;
│ │ │ -
141
│ │ │ -
143 bool equals(const HybridFactor& other, double tol = 1e-9) const override;
│ │ │ -
144
│ │ │ -
148
│ │ │ -
│ │ │ -
154 GaussianMixture::shared_ptr asMixture() const {
│ │ │ -
155 return boost::dynamic_pointer_cast<GaussianMixture>(inner_);
│ │ │ -
156 }
│ │ │ -
│ │ │ -
157
│ │ │ -
│ │ │ - │ │ │ -
164 return boost::dynamic_pointer_cast<GaussianConditional>(inner_);
│ │ │ -
165 }
│ │ │ -
│ │ │ -
166
│ │ │ -
│ │ │ - │ │ │ -
173 return boost::dynamic_pointer_cast<DiscreteConditional>(inner_);
│ │ │ -
174 }
│ │ │ -
│ │ │ -
175
│ │ │ -
177 boost::shared_ptr<Factor> inner() const { return inner_; }
│ │ │ -
178
│ │ │ -
180 double error(const HybridValues& values) const override;
│ │ │ -
181
│ │ │ -
183 double logProbability(const HybridValues& values) const override;
│ │ │ -
184
│ │ │ -
190 double logNormalizationConstant() const override;
│ │ │ -
191
│ │ │ -
193 double evaluate(const HybridValues& values) const override;
│ │ │ -
194
│ │ │ -
│ │ │ -
196 bool frontalsIn(const VectorValues& measurements) const {
│ │ │ -
197 for (Key key : frontals()) {
│ │ │ -
198 if (!measurements.exists(key)) {
│ │ │ -
199 return false;
│ │ │ -
200 }
│ │ │ -
201 }
│ │ │ -
202 return true;
│ │ │ -
203 }
│ │ │ -
│ │ │ -
204
│ │ │ -
206
│ │ │ -
207 private:
│ │ │ -
209 friend class boost::serialization::access;
│ │ │ -
210 template <class Archive>
│ │ │ -
211 void serialize(Archive& ar, const unsigned int /*version*/) {
│ │ │ -
212 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
│ │ │ -
213 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
│ │ │ -
214 ar& BOOST_SERIALIZATION_NVP(inner_);
│ │ │ -
215
│ │ │ -
216 // register the various casts based on the type of inner_
│ │ │ -
217 // https://www.boost.org/doc/libs/1_80_0/libs/serialization/doc/serialization.html#runtimecasting
│ │ │ -
218 if (isDiscrete()) {
│ │ │ -
219 boost::serialization::void_cast_register<DiscreteConditional, Factor>(
│ │ │ -
220 static_cast<DiscreteConditional*>(NULL), static_cast<Factor*>(NULL));
│ │ │ -
221 } else if (isContinuous()) {
│ │ │ -
222 boost::serialization::void_cast_register<GaussianConditional, Factor>(
│ │ │ -
223 static_cast<GaussianConditional*>(NULL), static_cast<Factor*>(NULL));
│ │ │ -
224 } else {
│ │ │ -
225 boost::serialization::void_cast_register<GaussianMixture, Factor>(
│ │ │ -
226 static_cast<GaussianMixture*>(NULL), static_cast<Factor*>(NULL));
│ │ │ -
227 }
│ │ │ -
228 }
│ │ │ -
229
│ │ │ -
230}; // HybridConditional
│ │ │ -
│ │ │ -
231
│ │ │ -
232// traits
│ │ │ -
233template <>
│ │ │ -
234struct traits<HybridConditional> : public Testable<HybridConditional> {};
│ │ │ -
235
│ │ │ -
236} // namespace gtsam
│ │ │ - │ │ │ -
Linearized Hybrid factor graph that uses type erasure.
│ │ │ - │ │ │ -
A hybrid conditional in the Conditional Linear Gaussian scheme.
│ │ │ - │ │ │ -
Base class for conditional densities.
│ │ │ -
Conditional Gaussian Base class.
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │ +
25
│ │ │ +
26// Forward declarations
│ │ │ +
27class HybridEliminationTree;
│ │ │ +
28
│ │ │ +
│ │ │ +
52class GTSAM_EXPORT HybridJunctionTree
│ │ │ +
53 : public JunctionTree<HybridBayesTree, HybridGaussianFactorGraph> {
│ │ │ +
54
│ │ │ +
55 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
59 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
60
│ │ │ +
70 HybridJunctionTree(const HybridEliminationTree& eliminationTree);
│ │ │ +
71};
│ │ │ +
│ │ │ +
72
│ │ │ +
73} // namespace gtsam
│ │ │ +
Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.
│ │ │ +
Linearized Hybrid factor graph that uses type erasure.
│ │ │ +
The junction tree.
│ │ │
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
│ │ │ -
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ -
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
│ │ │ -
Discrete Conditional Density Derives from DecisionTreeFactor.
Definition DiscreteConditional.h:40
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition DiscreteConditional.h:44
│ │ │ -
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition DiscreteKey.h:39
│ │ │ -
Hybrid Conditional Density.
Definition HybridConditional.h:62
│ │ │ -
Conditional< BaseFactor, This > BaseConditional
Typedef to our conditional base class.
Definition HybridConditional.h:69
│ │ │ -
HybridFactor BaseFactor
Typedef to our factor base class.
Definition HybridConditional.h:67
│ │ │ -
boost::shared_ptr< Factor > inner_
Type-erased pointer to the inner type.
Definition HybridConditional.h:73
│ │ │ -
DiscreteConditional::shared_ptr asDiscrete() const
Return conditional as a DiscreteConditional.
Definition HybridConditional.h:172
│ │ │ -
GaussianMixture::shared_ptr asMixture() const
Return HybridConditional as a GaussianMixture.
Definition HybridConditional.h:154
│ │ │ -
boost::shared_ptr< Factor > inner() const
Get the type-erased pointer to the inner type.
Definition HybridConditional.h:177
│ │ │ -
bool frontalsIn(const VectorValues &measurements) const
Check if VectorValues measurements contains all frontal keys.
Definition HybridConditional.h:196
│ │ │ -
HybridConditional(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, size_t nFrontals)
Construct a new Hybrid Conditional object.
Definition HybridConditional.h:89
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition HybridConditional.h:66
│ │ │ -
GaussianConditional::shared_ptr asGaussian() const
Return HybridConditional as a GaussianConditional.
Definition HybridConditional.h:163
│ │ │ -
HybridConditional This
Typedef to this class.
Definition HybridConditional.h:65
│ │ │ -
HybridConditional()=default
Default constructor needed for serialization.
│ │ │ -
Base class for truly hybrid probabilistic factors.
Definition HybridFactor.h:52
│ │ │ -
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ -
Definition Conditional.h:64
│ │ │ -
Definition Factor.h:68
│ │ │ -
A GaussianConditional functions as the node in a Bayes network.
Definition GaussianConditional.h:43
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition GaussianConditional.h:46
│ │ │ -
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ -
bool exists(Key j) const
Check whether a variable with key j exists.
Definition VectorValues.h:133
│ │ │ +
Elimination Tree type for Hybrid Factor Graphs.
Definition HybridEliminationTree.h:32
│ │ │ +
An EliminatableClusterTree, i.e., a set of variable clusters with factors, arranged in a tree,...
Definition HybridJunctionTree.h:53
│ │ │ +
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
Definition HybridJunctionTree.h:59
│ │ │ +
JunctionTree< HybridBayesTree, HybridGaussianFactorGraph > Base
Base class.
Definition HybridJunctionTree.h:57
│ │ │ +
HybridJunctionTree This
This class.
Definition HybridJunctionTree.h:58
│ │ │ +
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 │ │ │ │ -HybridConditional.h │ │ │ │ +HybridJunctionTree.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,260 +16,65 @@ │ │ │ │ 8 * See LICENSE for the license information │ │ │ │ 9 │ │ │ │ 10 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ 11 │ │ │ │ 18#pragma once │ │ │ │ 19 │ │ │ │ -20#include <_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> │ │ │ │ -21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -24#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> │ │ │ │ -25#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ -26#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ -27 │ │ │ │ -28#include │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31#include │ │ │ │ -32#include │ │ │ │ -33#include │ │ │ │ -34 │ │ │ │ -35namespace _g_t_s_a_m { │ │ │ │ -36 │ │ │ │ -_6_0class GTSAM_EXPORT _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -61 : public _H_y_b_r_i_d_F_a_c_t_o_r, │ │ │ │ -62 public _C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ -63 public: │ │ │ │ -64 // typedefs needed to play nice with gtsam │ │ │ │ -_6_5 typedef _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l _T_h_i_s; │ │ │ │ -_6_6 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ -_6_7 typedef _H_y_b_r_i_d_F_a_c_t_o_r _B_a_s_e_F_a_c_t_o_r; │ │ │ │ -68 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_> │ │ │ │ -_6_9 _B_a_s_e_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ -70 │ │ │ │ -71 protected: │ │ │ │ -_7_3 boost::shared_ptr _i_n_n_e_r__; │ │ │ │ -74 │ │ │ │ -75 public: │ │ │ │ -78 │ │ │ │ -_8_0 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l() = default; │ │ │ │ -81 │ │ │ │ -_8_9 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l(const _K_e_y_V_e_c_t_o_r& continuousKeys, │ │ │ │ -90 const _D_i_s_c_r_e_t_e_K_e_y_s& discreteKeys, size_t nFrontals) │ │ │ │ -91 : _B_a_s_e_F_a_c_t_o_r(continuousKeys, discreteKeys), _B_a_s_e_C_o_n_d_i_t_i_o_n_a_l(nFrontals) {} │ │ │ │ -92 │ │ │ │ -102 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l(const _K_e_y_V_e_c_t_o_r& continuousFrontals, │ │ │ │ -103 const _D_i_s_c_r_e_t_e_K_e_y_s& discreteFrontals, │ │ │ │ -104 const _K_e_y_V_e_c_t_o_r& continuousParents, │ │ │ │ -105 const _D_i_s_c_r_e_t_e_K_e_y_s& discreteParents); │ │ │ │ -106 │ │ │ │ -113 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l( │ │ │ │ -114 const boost::shared_ptr& continuousConditional); │ │ │ │ -115 │ │ │ │ -122 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l( │ │ │ │ -123 const boost::shared_ptr& discreteConditional); │ │ │ │ -124 │ │ │ │ -131 _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l(const boost::shared_ptr& │ │ │ │ -gaussianMixture); │ │ │ │ -132 │ │ │ │ -136 │ │ │ │ -138 void _p_r_i_n_t( │ │ │ │ -139 const std::string& s = "Hybrid Conditional: ", │ │ │ │ -140 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override; │ │ │ │ -141 │ │ │ │ -143 bool _e_q_u_a_l_s(const _H_y_b_r_i_d_F_a_c_t_o_r& other, double tol = 1e-9) const override; │ │ │ │ -144 │ │ │ │ -148 │ │ │ │ -_1_5_4 GaussianMixture::shared_ptr _a_s_M_i_x_t_u_r_e() const { │ │ │ │ -155 return boost::dynamic_pointer_cast(inner_); │ │ │ │ -156 } │ │ │ │ -157 │ │ │ │ -_1_6_3 _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r _a_s_G_a_u_s_s_i_a_n() const { │ │ │ │ -164 return boost::dynamic_pointer_cast(inner_); │ │ │ │ -165 } │ │ │ │ -166 │ │ │ │ -_1_7_2 _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 _a_s_D_i_s_c_r_e_t_e() const { │ │ │ │ -173 return boost::dynamic_pointer_cast(inner_); │ │ │ │ -174 } │ │ │ │ -175 │ │ │ │ -_1_7_7 boost::shared_ptr _i_n_n_e_r() const { return inner_; } │ │ │ │ -178 │ │ │ │ -180 double error(const _H_y_b_r_i_d_V_a_l_u_e_s& values) const override; │ │ │ │ -181 │ │ │ │ -183 double logProbability(const _H_y_b_r_i_d_V_a_l_u_e_s& values) const override; │ │ │ │ -184 │ │ │ │ -190 double logNormalizationConstant() const override; │ │ │ │ -191 │ │ │ │ -193 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s& values) const override; │ │ │ │ -194 │ │ │ │ -_1_9_6 bool _f_r_o_n_t_a_l_s_I_n(const _V_e_c_t_o_r_V_a_l_u_e_s& measurements) const { │ │ │ │ -197 for (_K_e_y key : frontals()) { │ │ │ │ -198 if (!measurements._e_x_i_s_t_s(key)) { │ │ │ │ -199 return false; │ │ │ │ -200 } │ │ │ │ -201 } │ │ │ │ -202 return true; │ │ │ │ -203 } │ │ │ │ -204 │ │ │ │ -206 │ │ │ │ -207 private: │ │ │ │ -_2_0_9 friend class boost::serialization::access; │ │ │ │ -210 template │ │ │ │ -211 void serialize(Archive& ar, const unsigned int /*version*/) { │ │ │ │ -212 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_F_a_c_t_o_r); │ │ │ │ -213 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l); │ │ │ │ -214 ar& BOOST_SERIALIZATION_NVP(inner_); │ │ │ │ -215 │ │ │ │ -216 // register the various casts based on the type of inner_ │ │ │ │ -217 // https://www.boost.org/doc/libs/1_80_0/libs/serialization/doc/ │ │ │ │ -serialization.html#runtimecasting │ │ │ │ -218 if (isDiscrete()) { │ │ │ │ -219 boost::serialization::void_cast_register( │ │ │ │ -220 static_cast<_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l*>(NULL), static_cast<_F_a_c_t_o_r*>(NULL)); │ │ │ │ -221 } else if (isContinuous()) { │ │ │ │ -222 boost::serialization::void_cast_register( │ │ │ │ -223 static_cast<_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l*>(NULL), static_cast<_F_a_c_t_o_r*>(NULL)); │ │ │ │ -224 } else { │ │ │ │ -225 boost::serialization::void_cast_register( │ │ │ │ -226 static_cast(NULL), static_cast(NULL)); │ │ │ │ -227 } │ │ │ │ -228 } │ │ │ │ -229 │ │ │ │ -230}; // HybridConditional │ │ │ │ -231 │ │ │ │ -232// traits │ │ │ │ -233template <> │ │ │ │ -_2_3_4struct _t_r_a_i_t_s<_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -235 │ │ │ │ -236} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +22#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> │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +26// Forward declarations │ │ │ │ +27class HybridEliminationTree; │ │ │ │ +28 │ │ │ │ +_5_2class GTSAM_EXPORT _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e │ │ │ │ +53 : public _J_u_n_c_t_i_o_n_T_r_e_e { │ │ │ │ +54 │ │ │ │ +55 public: │ │ │ │ +56 typedef _J_u_n_c_t_i_o_n_T_r_e_e_<_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_,_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ +_5_7 _B_a_s_e; │ │ │ │ +_5_8 typedef _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ +_5_9 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ +60 │ │ │ │ +70 _H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e& eliminationTree); │ │ │ │ +71}; │ │ │ │ +72 │ │ │ │ +73} // namespace gtsam │ │ │ │ +_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ Linearized Hybrid factor graph that uses type erasure. │ │ │ │ -_H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ -_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_._h │ │ │ │ -A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ │ -_K_e_y_._h │ │ │ │ -_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -Base class for conditional densities. │ │ │ │ -_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -Conditional Gaussian Base class. │ │ │ │ +_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_:_:_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_:_:_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 │ │ │ │ -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_:_:_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_:_:_s_h_a_r_e_d___p_t_r │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +Elimination Tree type for Hybrid Factor Graphs. │ │ │ │ +DDeeffiinniittiioonn HybridEliminationTree.h:32 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridJunctionTree.h:53 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_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_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_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Hybrid Conditional Density. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:62 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridConditional.h:69 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_B_a_s_e_F_a_c_t_o_r │ │ │ │ -HybridFactor BaseFactor │ │ │ │ -Typedef to our factor base class. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:67 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_i_n_n_e_r__ │ │ │ │ -boost::shared_ptr< Factor > inner_ │ │ │ │ -Type-erased pointer to the inner type. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:73 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_a_s_D_i_s_c_r_e_t_e │ │ │ │ -DiscreteConditional::shared_ptr asDiscrete() const │ │ │ │ -Return conditional as a DiscreteConditional. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:172 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_a_s_M_i_x_t_u_r_e │ │ │ │ -GaussianMixture::shared_ptr asMixture() const │ │ │ │ -Return HybridConditional as a GaussianMixture. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:154 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_i_n_n_e_r │ │ │ │ -boost::shared_ptr< Factor > inner() const │ │ │ │ -Get the type-erased pointer to the inner type. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:177 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_f_r_o_n_t_a_l_s_I_n │ │ │ │ -bool frontalsIn(const VectorValues &measurements) const │ │ │ │ -Check if VectorValues measurements contains all frontal keys. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:196 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -HybridConditional(const KeyVector &continuousKeys, const DiscreteKeys │ │ │ │ -&discreteKeys, size_t nFrontals) │ │ │ │ -Construct a new Hybrid Conditional object. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:89 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridConditional.h:66 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_a_s_G_a_u_s_s_i_a_n │ │ │ │ -GaussianConditional::shared_ptr asGaussian() const │ │ │ │ -Return HybridConditional as a GaussianConditional. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:163 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_T_h_i_s │ │ │ │ -HybridConditional This │ │ │ │ -Typedef to this class. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:65 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -HybridConditional()=default │ │ │ │ -Default constructor needed for serialization. │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -Base class for truly hybrid probabilistic factors. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:52 │ │ │ │ -_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 │ │ │ │ -_g_t_s_a_m_:_:_F_a_c_t_o_r │ │ │ │ -DDeeffiinniittiioonn Factor.h:68 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -A GaussianConditional functions as the node in a Bayes network. │ │ │ │ -DDeeffiinniittiioonn GaussianConditional.h:43 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_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 GaussianConditional.h:46 │ │ │ │ -_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ -VectorValues represents a collection of vector-valued variables associated each │ │ │ │ -with a unique integer... │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ -_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s_:_:_e_x_i_s_t_s │ │ │ │ -bool exists(Key j) const │ │ │ │ -Check whether a variable with key j exists. │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:133 │ │ │ │ +Shared pointer to this class. │ │ │ │ +DDeeffiinniittiioonn HybridJunctionTree.h:59 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ +JunctionTree< HybridBayesTree, HybridGaussianFactorGraph > Base │ │ │ │ +Base class. │ │ │ │ +DDeeffiinniittiioonn HybridJunctionTree.h:57 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_J_u_n_c_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ +HybridJunctionTree This │ │ │ │ +This class. │ │ │ │ +DDeeffiinniittiioonn HybridJunctionTree.h:58 │ │ │ │ +_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 │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00545.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridConditional.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,32 +94,64 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces
│ │ │ -
HybridConditional.cpp File Reference
│ │ │ +Classes | │ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
HybridFactor.h File Reference
│ │ │ │ │ │
│ │ │ + │ │ │ +

Go to the source code of this file.

│ │ │

│ │ │ Namespaces

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

│ │ │ +Classes

class  gtsam::HybridFactor
 Base class for truly hybrid probabilistic factors. More...
 
struct  gtsam::traits< HybridFactor >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Typedefs

│ │ │ +using gtsam::GaussianFactorGraphTree = DecisionTree< Key, GaussianFactorGraph >
 Alias for DecisionTree of GaussianFactorGraphs.
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

│ │ │ +KeyVector gtsam::CollectKeys (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
 
│ │ │ +KeyVector gtsam::CollectKeys (const KeyVector &keys1, const KeyVector &keys2)
 
│ │ │ +DiscreteKeys gtsam::CollectDiscreteKeys (const DiscreteKeys &key1, const DiscreteKeys &key2)
 
│ │ │

Detailed Description

│ │ │
Date
Mar 11, 2022
│ │ │
Author
Fan Jiang
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,42 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridConditional.cpp 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 | _F_u_n_c_t_i_o_n_s │ │ │ │ +HybridFactor.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_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ +  Base class for ttrruullyy hybrid probabilistic factors. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_F_a_c_t_o_r_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +using  ggttssaamm::::GGaauussssiiaannFFaaccttoorrGGrraapphhTTrreeee = _D_e_c_i_s_i_o_n_T_r_e_e< _K_e_y, _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ + > │ │ │ │ +  Alias for _D_e_c_i_s_i_o_n_T_r_e_e of GaussianFactorGraphs. │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ + _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &continuousKeys, const │ │ │ │ + _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys) │ │ │ │ +  │ │ │ │ + _K_e_y_V_e_c_t_o_r  ggttssaamm::::CCoolllleeccttKKeeyyss (const _K_e_y_V_e_c_t_o_r &keys1, const _K_e_y_V_e_c_t_o_r │ │ │ │ + &keys2) │ │ │ │ +  │ │ │ │ +_D_i_s_c_r_e_t_e_K_e_y_s  ggttssaamm::::CCoolllleeccttDDiissccrreetteeKKeeyyss (const _D_i_s_c_r_e_t_e_K_e_y_s &key1, const │ │ │ │ + _D_i_s_c_r_e_t_e_K_e_y_s &key2) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_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/a00548.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesTree.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridSmoother.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,54 +94,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces
│ │ │ -
HybridBayesTree.h File Reference
│ │ │ +
HybridSmoother.cpp File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ +

An incremental smoother for hybrid factor graphs. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::HybridBayesTreeClique
 A clique in a HybridBayesTree which is a HybridConditional internally. More...
 
class  gtsam::HybridBayesTree
 A Bayes tree representing a Hybrid density. More...
 
struct  gtsam::traits< HybridBayesTree >
 traits More...
 
class  gtsam::BayesTreeOrphanWrapper< HybridBayesTreeClique >
 Class for Hybrid Bayes tree orphan subtrees. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang
│ │ │ +

An incremental smoother for hybrid factor graphs.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
Date
October 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,37 +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 │ │ │ │ -HybridBayesTree.h File Reference │ │ │ │ -Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. _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_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e │ │ │ │ -  A clique in a _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e which is a _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l internally. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e │ │ │ │ -  A Bayes tree representing a Hybrid density. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_ _> │ │ │ │ -  traits _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ - class   _g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_<_ _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_ _> │ │ │ │ -  Class for Hybrid Bayes tree orphan subtrees. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridSmoother.cpp File Reference │ │ │ │ +An incremental smoother for hybrid factor graphs. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ - Date │ │ │ │ - Mar 11, 2022 │ │ │ │ +An incremental smoother for hybrid factor graphs. │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ + Varun Agrawal │ │ │ │ + Date │ │ │ │ + October 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._h │ │ │ │ + * _H_y_b_r_i_d_S_m_o_o_t_h_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/a00551.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesTree.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridConditional.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,35 +95,31 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
HybridBayesTree.cpp File Reference
│ │ │ +
HybridConditional.cpp File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ -

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ -More...

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree.

│ │ │ -
Date
Mar 11, 2022
│ │ │ -
Author
Fan Jiang, Varun Agrawal
│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,22 +1,20 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -HybridBayesTree.cpp File Reference │ │ │ │ -Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. _M_o_r_e_._._. │ │ │ │ +HybridConditional.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Hybrid Bayes Tree, the result of eliminating a HybridJunctionTree. │ │ │ │ Date │ │ │ │ Mar 11, 2022 │ │ │ │ Author │ │ │ │ - Fan Jiang, Varun Agrawal │ │ │ │ + Fan Jiang │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_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/a00554.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesNet.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridEliminationTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,50 +96,39 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
HybridBayesNet.h File Reference
│ │ │ +
HybridEliminationTree.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ -More...

│ │ │ - │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::HybridBayesNet
 A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals, Gaussian mixtures, or pure Gaussian conditionals. More...
 
struct  gtsam::traits< HybridBayesNet >
 traits More...
class  gtsam::HybridEliminationTree
 Elimination Tree type for Hybrid Factor Graphs. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

A Bayes net of Gaussian Conditionals indexed by discrete keys.

│ │ │ -
Author
Varun Agrawal
│ │ │ -
│ │ │ -Fan Jiang
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
Date
December 2021
│ │ │ +
Date
Mar 11, 2022
│ │ │ +
Author
Fan Jiang
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,25 @@ │ │ │ │ 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 │ │ │ │ -HybridBayesNet.h File Reference │ │ │ │ -A Bayes net of Gaussian Conditionals indexed by discrete keys. _M_o_r_e_._._. │ │ │ │ +HybridEliminationTree.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_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ - A hybrid Bayes net is a collection of HybridConditionals, which can │ │ │ │ -  have discrete conditionals, Gaussian mixtures, or pure Gaussian │ │ │ │ - conditionals. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_B_a_y_e_s_N_e_t_ _> │ │ │ │ -  traits _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +  Elimination Tree type for Hybrid _F_a_c_t_o_r Graphs. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ + Date │ │ │ │ + Mar 11, 2022 │ │ │ │ Author │ │ │ │ - Varun Agrawal │ │ │ │ Fan Jiang │ │ │ │ - Frank Dellaert │ │ │ │ - Date │ │ │ │ - December 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00554_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridBayesNet.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridEliminationTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,161 +98,78 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
HybridBayesNet.h
│ │ │ +
HybridEliminationTree.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │ -
2 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ -
3 * Atlanta, Georgia 30332-0415
│ │ │ -
4 * All Rights Reserved
│ │ │ -
5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
│ │ │ -
6 * See LICENSE for the license information
│ │ │ -
7 * -------------------------------------------------------------------------- */
│ │ │ -
8
│ │ │ +
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
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
26
│ │ │ -
27namespace gtsam {
│ │ │ -
28
│ │ │ -
│ │ │ -
35class GTSAM_EXPORT HybridBayesNet : public BayesNet<HybridConditional> {
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
23
│ │ │ +
24namespace gtsam {
│ │ │ +
25
│ │ │ +
│ │ │ +
31class GTSAM_EXPORT HybridEliminationTree
│ │ │ +
32 : public EliminationTree<HybridBayesNet, HybridGaussianFactorGraph> {
│ │ │ +
33 private:
│ │ │ +
34 friend class ::EliminationTreeTester;
│ │ │ +
35
│ │ │
36 public:
│ │ │ - │ │ │ -
38 using This = HybridBayesNet;
│ │ │ - │ │ │ -
40 using shared_ptr = boost::shared_ptr<HybridBayesNet>;
│ │ │ -
41 using sharedConditional = boost::shared_ptr<ConditionalType>;
│ │ │ -
42
│ │ │ -
45
│ │ │ -
47 HybridBayesNet() = default;
│ │ │ -
48
│ │ │ -
52
│ │ │ -
54 void print(const std::string &s = "", const KeyFormatter &formatter =
│ │ │ -
55 DefaultKeyFormatter) const override;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
40 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
41
│ │ │ +
44
│ │ │ + │ │ │ +
55 const VariableIndex& structure, const Ordering& order);
│ │ │
56
│ │ │ -
58 bool equals(const This &fg, double tol = 1e-9) const;
│ │ │ -
59
│ │ │ -
63
│ │ │ -
│ │ │ -
69 void push_back(boost::shared_ptr<HybridConditional> conditional) {
│ │ │ -
70 factors_.push_back(conditional);
│ │ │ -
71 }
│ │ │ -
│ │ │ -
72
│ │ │ -
81 template <class Conditional>
│ │ │ -
│ │ │ -
82 void emplace_back(Conditional *conditional) {
│ │ │ -
83 factors_.push_back(boost::make_shared<HybridConditional>(
│ │ │ -
84 boost::shared_ptr<Conditional>(conditional)));
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86
│ │ │ -
│ │ │ -
99 void push_back(HybridConditional &&conditional) {
│ │ │ -
100 factors_.push_back(
│ │ │ -
101 boost::make_shared<HybridConditional>(std::move(conditional)));
│ │ │ -
102 }
│ │ │ -
│ │ │ -
103
│ │ │ -
111 GaussianBayesNet choose(const DiscreteValues &assignment) const;
│ │ │ -
112
│ │ │ -
114 double evaluate(const HybridValues &values) const;
│ │ │ -
115
│ │ │ -
│ │ │ -
117 double operator()(const HybridValues &values) const {
│ │ │ -
118 return evaluate(values);
│ │ │ -
119 }
│ │ │ -
│ │ │ -
120
│ │ │ -
128 HybridValues optimize() const;
│ │ │ -
129
│ │ │ -
137 VectorValues optimize(const DiscreteValues &assignment) const;
│ │ │ -
138
│ │ │ -
144 DecisionTreeFactor::shared_ptr discreteConditionals() const;
│ │ │ -
145
│ │ │ -
158 HybridValues sample(const HybridValues &given, std::mt19937_64 *rng) const;
│ │ │ -
159
│ │ │ -
170 HybridValues sample(std::mt19937_64 *rng) const;
│ │ │ -
171
│ │ │ -
178 HybridValues sample(const HybridValues &given) const;
│ │ │ -
179
│ │ │ -
185 HybridValues sample() const;
│ │ │ -
186
│ │ │ -
188 HybridBayesNet prune(size_t maxNrLeaves);
│ │ │ -
189
│ │ │ -
197 AlgebraicDecisionTree<Key> logProbability(
│ │ │ -
198 const VectorValues &continuousValues) const;
│ │ │ -
199
│ │ │ -
200 using BayesNet::logProbability; // expose HybridValues version
│ │ │ -
201
│ │ │ - │ │ │ -
213 const VectorValues &continuousValues) const;
│ │ │ -
214
│ │ │ -
219 HybridGaussianFactorGraph toFactorGraph(
│ │ │ -
220 const VectorValues &measurements) const;
│ │ │ -
222
│ │ │ -
223 private:
│ │ │ -
229 void updateDiscreteConditionals(const DecisionTreeFactor &prunedDecisionTree);
│ │ │ -
230
│ │ │ -
232 friend class boost::serialization::access;
│ │ │ -
233 template <class ARCHIVE>
│ │ │ -
234 void serialize(ARCHIVE &ar, const unsigned int /*version*/) {
│ │ │ -
235 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
236 }
│ │ │ -
237};
│ │ │ -
│ │ │ -
238
│ │ │ -
240template <>
│ │ │ -
241struct traits<HybridBayesNet> : public Testable<HybridBayesNet> {};
│ │ │ -
242
│ │ │ -
243} // namespace gtsam
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
Bayes network.
│ │ │ -
Chordal Bayes Net, the result of eliminating a factor graph.
│ │ │ -
Included from all GTSAM files.
│ │ │ + │ │ │ +
63 const Ordering& order);
│ │ │ +
64
│ │ │ +
66
│ │ │ +
68 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ +
69};
│ │ │ +
│ │ │ +
70
│ │ │ +
71} // namespace gtsam
│ │ │ +
A Bayes net of Gaussian Conditionals indexed by discrete keys.
│ │ │ +
Linearized Hybrid factor graph that uses type erasure.
│ │ │ + │ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition triangulation.cpp:155
│ │ │ -
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
│ │ │
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
│ │ │ -
A map from keys to values.
Definition DiscreteValues.h:34
│ │ │ -
A hybrid Bayes net is a collection of HybridConditionals, which can have discrete conditionals,...
Definition HybridBayesNet.h:35
│ │ │ -
void push_back(boost::shared_ptr< HybridConditional > conditional)
Add a hybrid conditional using a shared_ptr.
Definition HybridBayesNet.h:69
│ │ │ -
void emplace_back(Conditional *conditional)
Preferred: add a conditional directly using a pointer.
Definition HybridBayesNet.h:82
│ │ │ -
void push_back(HybridConditional &&conditional)
Add a conditional using a shared_ptr, using implicit conversion to a HybridConditional.
Definition HybridBayesNet.h:99
│ │ │ -
HybridBayesNet()=default
Construct empty Bayes net.
│ │ │ -
double operator()(const HybridValues &values) const
Evaluate hybrid probability density for given HybridValues, sugar.
Definition HybridBayesNet.h:117
│ │ │ -
Hybrid Conditional Density.
Definition HybridConditional.h:62
│ │ │ +
Elimination Tree type for Hybrid Factor Graphs.
Definition HybridEliminationTree.h:32
│ │ │ +
HybridEliminationTree This
This class.
Definition HybridEliminationTree.h:39
│ │ │ +
boost::shared_ptr< This > shared_ptr
Shared pointer to this class.
Definition HybridEliminationTree.h:40
│ │ │ +
EliminationTree< HybridBayesNet, HybridGaussianFactorGraph > Base
Base class.
Definition HybridEliminationTree.h:38
│ │ │
Definition HybridGaussianFactorGraph.h:102
│ │ │ -
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ -
A BayesNet is a tree of conditionals, stored in elimination order.
Definition BayesNet.h:35
│ │ │ -
Definition Conditional.h:64
│ │ │ -
GaussianBayesNet is a Bayes net made from linear-Gaussian conditionals.
Definition GaussianBayesNet.h:36
│ │ │ -
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
An elimination tree is a data structure used intermediately during elimination.
Definition EliminationTree.h:52
│ │ │ +
Definition Ordering.h:34
│ │ │ +
The VariableIndex class computes and stores the block column structure of a factor graph.
Definition VariableIndex.h:43
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,203 +1,92 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -HybridBayesNet.h │ │ │ │ +HybridEliminationTree.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 * GTSAM Copyright 2010, Georgia Tech Research Corporation, │ │ │ │ -3 * Atlanta, Georgia 30332-0415 │ │ │ │ -4 * All Rights Reserved │ │ │ │ -5 * Authors: Frank Dellaert, et al. (see THANKS for the full author list) │ │ │ │ -6 * See LICENSE for the license information │ │ │ │ -7 * ------------------------------------------------------------------------- │ │ │ │ +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 * ------------------------------------------------------------------------- │ │ │ │ - */ │ │ │ │ -8 │ │ │ │ +11 │ │ │ │ 18#pragma once │ │ │ │ 19 │ │ │ │ -20#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> │ │ │ │ -21#include <_g_t_s_a_m_/_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h> │ │ │ │ -22#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ -23#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_V_a_l_u_e_s_._h> │ │ │ │ -24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_B_a_y_e_s_N_e_t_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t_._h> │ │ │ │ -26 │ │ │ │ -27namespace _g_t_s_a_m { │ │ │ │ -28 │ │ │ │ -_3_5class GTSAM_EXPORT _H_y_b_r_i_d_B_a_y_e_s_N_e_t : public _B_a_y_e_s_N_e_t { │ │ │ │ +20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +22#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> │ │ │ │ +23 │ │ │ │ +24namespace _g_t_s_a_m { │ │ │ │ +25 │ │ │ │ +_3_1class GTSAM_EXPORT _H_y_b_r_i_d_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 private: │ │ │ │ +34 friend class ::EliminationTreeTester; │ │ │ │ +35 │ │ │ │ 36 public: │ │ │ │ -37 using _B_a_s_e = _B_a_y_e_s_N_e_t_<_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_>; │ │ │ │ -38 using _T_h_i_s = _H_y_b_r_i_d_B_a_y_e_s_N_e_t; │ │ │ │ -39 using _C_o_n_d_i_t_i_o_n_a_l_T_y_p_e = _H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l; │ │ │ │ -40 using shared_ptr = boost::shared_ptr; │ │ │ │ -41 using sharedConditional = boost::shared_ptr; │ │ │ │ -42 │ │ │ │ -45 │ │ │ │ -_4_7 _H_y_b_r_i_d_B_a_y_e_s_N_e_t() = default; │ │ │ │ -48 │ │ │ │ -52 │ │ │ │ -54 void _p_r_i_n_t(const std::string &s = "", const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = │ │ │ │ -55 DefaultKeyFormatter) const override; │ │ │ │ +37 typedef _E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_<_H_y_b_r_i_d_B_a_y_e_s_N_e_t_,_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_> │ │ │ │ +_3_8 _B_a_s_e; │ │ │ │ +_3_9 typedef _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e _T_h_i_s; │ │ │ │ +_4_0 typedef boost::shared_ptr _s_h_a_r_e_d___p_t_r; │ │ │ │ +41 │ │ │ │ +44 │ │ │ │ +54 _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ +55 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); │ │ │ │ 56 │ │ │ │ -58 bool _e_q_u_a_l_s(const _T_h_i_s &fg, double tol = 1e-9) const; │ │ │ │ -59 │ │ │ │ -63 │ │ │ │ -_6_9 void _p_u_s_h___b_a_c_k(boost::shared_ptr conditional) { │ │ │ │ -70 factors_.push_back(conditional); │ │ │ │ -71 } │ │ │ │ -72 │ │ │ │ -81 template │ │ │ │ -_8_2 void _e_m_p_l_a_c_e___b_a_c_k(_C_o_n_d_i_t_i_o_n_a_l *conditional) { │ │ │ │ -83 factors_.push_back(boost::make_shared( │ │ │ │ -84 boost::shared_ptr(conditional))); │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -_9_9 void _p_u_s_h___b_a_c_k(_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l &&conditional) { │ │ │ │ -100 factors_.push_back( │ │ │ │ -101 boost::make_shared(std::move(conditional))); │ │ │ │ -102 } │ │ │ │ -103 │ │ │ │ -111 _G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t choose(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ -112 │ │ │ │ -114 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const; │ │ │ │ -115 │ │ │ │ -_1_1_7 double _o_p_e_r_a_t_o_r_(_)(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const { │ │ │ │ -118 return evaluate(values); │ │ │ │ -119 } │ │ │ │ -120 │ │ │ │ -128 _H_y_b_r_i_d_V_a_l_u_e_s _o_p_t_i_m_i_z_e() const; │ │ │ │ -129 │ │ │ │ -137 _V_e_c_t_o_r_V_a_l_u_e_s _o_p_t_i_m_i_z_e(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ -138 │ │ │ │ -144 DecisionTreeFactor::shared_ptr discreteConditionals() const; │ │ │ │ -145 │ │ │ │ -158 _H_y_b_r_i_d_V_a_l_u_e_s sample(const _H_y_b_r_i_d_V_a_l_u_e_s &given, std::mt19937_64 *rng) const; │ │ │ │ -159 │ │ │ │ -170 _H_y_b_r_i_d_V_a_l_u_e_s sample(std::mt19937_64 *rng) const; │ │ │ │ -171 │ │ │ │ -178 _H_y_b_r_i_d_V_a_l_u_e_s sample(const _H_y_b_r_i_d_V_a_l_u_e_s &given) const; │ │ │ │ -179 │ │ │ │ -185 _H_y_b_r_i_d_V_a_l_u_e_s sample() const; │ │ │ │ -186 │ │ │ │ -188 _H_y_b_r_i_d_B_a_y_e_s_N_e_t prune(size_t maxNrLeaves); │ │ │ │ -189 │ │ │ │ -197 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> logProbability( │ │ │ │ -198 const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) const; │ │ │ │ -199 │ │ │ │ -200 using BayesNet::logProbability; // expose HybridValues version │ │ │ │ -201 │ │ │ │ -212 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> evaluate( │ │ │ │ -213 const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) const; │ │ │ │ -214 │ │ │ │ -219 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h toFactorGraph( │ │ │ │ -220 const _V_e_c_t_o_r_V_a_l_u_e_s &measurements) const; │ │ │ │ -222 │ │ │ │ -223 private: │ │ │ │ -229 void updateDiscreteConditionals(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r │ │ │ │ -&prunedDecisionTree); │ │ │ │ -230 │ │ │ │ -_2_3_2 friend class boost::serialization::access; │ │ │ │ -233 template │ │ │ │ -234 void serialize(ARCHIVE &ar, const unsigned int /*version*/) { │ │ │ │ -235 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -236 } │ │ │ │ -237}; │ │ │ │ -238 │ │ │ │ -240template <> │ │ │ │ -_2_4_1struct _t_r_a_i_t_s<_H_y_b_r_i_d_B_a_y_e_s_N_e_t> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -242 │ │ │ │ -243} // namespace gtsam │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s_._h │ │ │ │ -_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -_B_a_y_e_s_N_e_t_._h │ │ │ │ -Bayes network. │ │ │ │ -_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t_._h │ │ │ │ -Chordal Bayes Net, the result of eliminating a factor graph. │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +62 _H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e(const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h& factorGraph, │ │ │ │ +63 const _O_r_d_e_r_i_n_g& order); │ │ │ │ +64 │ │ │ │ +66 │ │ │ │ +68 bool _e_q_u_a_l_s(const _T_h_i_s& other, double tol = 1e-9) const; │ │ │ │ +69}; │ │ │ │ +70 │ │ │ │ +71} // namespace gtsam │ │ │ │ +_H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ +A Bayes net of Gaussian Conditionals indexed by discrete keys. │ │ │ │ +_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Linearized Hybrid factor graph that uses type erasure. │ │ │ │ +_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_:_:_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_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_:_:_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_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_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ -A hybrid Bayes net is a collection of HybridConditionals, which can have │ │ │ │ -discrete conditionals,... │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.h:35 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_p_u_s_h___b_a_c_k │ │ │ │ -void push_back(boost::shared_ptr< HybridConditional > conditional) │ │ │ │ -Add a hybrid conditional using a shared_ptr. │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.h:69 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_e_m_p_l_a_c_e___b_a_c_k │ │ │ │ -void emplace_back(Conditional *conditional) │ │ │ │ -Preferred: add a conditional directly using a pointer. │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.h:82 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_p_u_s_h___b_a_c_k │ │ │ │ -void push_back(HybridConditional &&conditional) │ │ │ │ -Add a conditional using a shared_ptr, using implicit conversion to a │ │ │ │ -HybridConditional. │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.h:99 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t │ │ │ │ -HybridBayesNet()=default │ │ │ │ -Construct empty Bayes net. │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_N_e_t_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const HybridValues &values) const │ │ │ │ -Evaluate hybrid probability density for given HybridValues, sugar. │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.h:117 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -Hybrid Conditional Density. │ │ │ │ -DDeeffiinniittiioonn HybridConditional.h:62 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e │ │ │ │ +Elimination Tree type for Hybrid Factor Graphs. │ │ │ │ +DDeeffiinniittiioonn HybridEliminationTree.h:32 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_T_h_i_s │ │ │ │ +HybridEliminationTree This │ │ │ │ +This class. │ │ │ │ +DDeeffiinniittiioonn HybridEliminationTree.h:39 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_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 HybridEliminationTree.h:40 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_E_l_i_m_i_n_a_t_i_o_n_T_r_e_e_:_:_B_a_s_e │ │ │ │ +EliminationTree< HybridBayesNet, HybridGaussianFactorGraph > Base │ │ │ │ +Base class. │ │ │ │ +DDeeffiinniittiioonn HybridEliminationTree.h:38 │ │ │ │ _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ DDeeffiinniittiioonn HybridGaussianFactorGraph.h:102 │ │ │ │ -_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_:_:_B_a_y_e_s_N_e_t │ │ │ │ -A BayesNet is a tree of conditionals, stored in elimination order. │ │ │ │ -DDeeffiinniittiioonn BayesNet.h:35 │ │ │ │ -_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l │ │ │ │ -DDeeffiinniittiioonn Conditional.h:64 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_B_a_y_e_s_N_e_t │ │ │ │ -GaussianBayesNet is a Bayes net made from linear-Gaussian conditionals. │ │ │ │ -DDeeffiinniittiioonn GaussianBayesNet.h:36 │ │ │ │ -_g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ -VectorValues represents a collection of vector-valued variables associated each │ │ │ │ -with a unique integer... │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_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 │ │ │ │ +_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 │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _H_y_b_r_i_d_B_a_y_e_s_N_e_t_._h │ │ │ │ + * _H_y_b_r_i_d_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/a00560.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -96,49 +96,39 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
GaussianMixtureFactor.h File Reference
│ │ │ +
HybridNonlinearISAM.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ -More...

│ │ │ - │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::GaussianMixtureFactor
 Implementation of a discrete conditional mixture factor. More...
 
struct  gtsam::traits< GaussianMixtureFactor >
class  gtsam::HybridNonlinearISAM
 Wrapper class to manage ISAM in a nonlinear context. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

A set of GaussianFactors, indexed by a set of discrete keys.

│ │ │ -
Author
Fan Jiang
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
Date
Mar 12, 2022
│ │ │ +
Date
Sep 12, 2022
│ │ │ +
Author
Varun Agrawal
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,31 +1,25 @@ │ │ │ │ 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 │ │ │ │ -GaussianMixtureFactor.h File Reference │ │ │ │ -A set of GaussianFactors, indexed by a set of discrete keys. _M_o_r_e_._._. │ │ │ │ +HybridNonlinearISAM.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_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ -  Implementation of a discrete conditional mixture factor. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_ _> │ │ │ │ +class   _g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ +  Wrapper class to manage _I_S_A_M in a nonlinear context. _M_o_r_e_._._. │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ │ + Date │ │ │ │ + Sep 12, 2022 │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ - Frank Dellaert │ │ │ │ - Date │ │ │ │ - Mar 12, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h │ │ │ │ + * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_._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/a00560.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ var a00560 = [ │ │ │ │ - ["gtsam::traits< GaussianMixtureFactor >", "a03404.html", null] │ │ │ │ + ["gtsam::HybridNonlinearISAM", "a03496.html", "a03496"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00560_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearISAM.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,149 +98,139 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
GaussianMixtureFactor.h
│ │ │ +
HybridNonlinearISAM.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
│ │ │ +
18#pragma once
│ │ │ +
19
│ │ │ + │ │ │ + │ │ │
22
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
29
│ │ │ -
30namespace gtsam {
│ │ │ +
23namespace gtsam {
│ │ │ +
│ │ │ +
27class GTSAM_EXPORT HybridNonlinearISAM {
│ │ │ +
28 protected:
│ │ │ + │ │ │
31
│ │ │ -
32class HybridValues;
│ │ │ -
33class DiscreteValues;
│ │ │ -
34class VectorValues;
│ │ │ -
35
│ │ │ -
│ │ │ -
47class GTSAM_EXPORT GaussianMixtureFactor : public HybridFactor {
│ │ │ + │ │ │ +
34
│ │ │ + │ │ │ +
37
│ │ │ + │ │ │ +
40
│ │ │ + │ │ │ +
43 int reorderCounter_;
│ │ │ +
44
│ │ │ + │ │ │ +
47
│ │ │
48 public:
│ │ │ -
49 using Base = HybridFactor;
│ │ │ - │ │ │ -
51 using shared_ptr = boost::shared_ptr<This>;
│ │ │ -
52
│ │ │ -
53 using sharedFactor = boost::shared_ptr<GaussianFactor>;
│ │ │ -
54
│ │ │ - │ │ │ -
57
│ │ │ -
58 private:
│ │ │ -
60 Factors factors_;
│ │ │ -
61
│ │ │ -
68 GaussianFactorGraphTree asGaussianFactorGraphTree() const;
│ │ │ -
69
│ │ │ -
70 public:
│ │ │ +
51
│ │ │ +
│ │ │ + │ │ │ +
60 int reorderInterval = 1,
│ │ │ +
61 const HybridGaussianFactorGraph::Eliminate& eliminationFunction =
│ │ │ +
62 HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
│ │ │ +
63 : reorderInterval_(reorderInterval),
│ │ │ +
64 reorderCounter_(0),
│ │ │ +
65 eliminationFunction_(eliminationFunction) {}
│ │ │ +
│ │ │ +
66
│ │ │ +
70
│ │ │ +
72 Values estimate();
│ │ │
73
│ │ │ - │ │ │ +
74 // /** find the marginal covariance for a single variable */
│ │ │ +
75 // Matrix marginalCovariance(Key key) const;
│ │ │
76
│ │ │ -
86 GaussianMixtureFactor(const KeyVector &continuousKeys,
│ │ │ -
87 const DiscreteKeys &discreteKeys,
│ │ │ -
88 const Factors &factors);
│ │ │ -
89
│ │ │ -
│ │ │ -
98 GaussianMixtureFactor(const KeyVector &continuousKeys,
│ │ │ -
99 const DiscreteKeys &discreteKeys,
│ │ │ -
100 const std::vector<sharedFactor> &factors)
│ │ │ -
101 : GaussianMixtureFactor(continuousKeys, discreteKeys,
│ │ │ -
102 Factors(discreteKeys, factors)) {}
│ │ │ -
│ │ │ +
77 // access
│ │ │ +
78
│ │ │ +
80 const HybridGaussianISAM& bayesTree() const { return isam_; }
│ │ │ +
81
│ │ │ +
87 void prune(const size_t maxNumberLeaves) { isam_.prune(maxNumberLeaves); }
│ │ │ +
88
│ │ │ +
90 const Values& getLinearizationPoint() const { return linPoint_; }
│ │ │ +
91
│ │ │ +
93 const DiscreteValues& assignment() const { return assignment_; }
│ │ │ +
94
│ │ │ +
│ │ │ + │ │ │ +
97 return factors_;
│ │ │ +
98 }
│ │ │ +
│ │ │ +
99
│ │ │ +
101 int reorderInterval() const { return reorderInterval_; }
│ │ │ +
│ │ │ +
102 int reorderCounter() const { return reorderCounter_; }
│ │ │
103
│ │ │ +
105 void print(const std::string& s = "",
│ │ │ +
106 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │
107
│ │ │ -
108 bool equals(const HybridFactor &lf, double tol = 1e-9) const override;
│ │ │ -
109
│ │ │ -
110 void print(
│ │ │ -
111 const std::string &s = "GaussianMixtureFactor\n",
│ │ │ -
112 const KeyFormatter &formatter = DefaultKeyFormatter) const override;
│ │ │ -
113
│ │ │ -
117
│ │ │ -
119 sharedFactor operator()(const DiscreteValues &assignment) const;
│ │ │ -
120
│ │ │ - │ │ │ +
109 void printStats() const;
│ │ │ +
110
│ │ │ +
112 void saveGraph(const std::string& s,
│ │ │ +
113 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
114
│ │ │ +
118
│ │ │ +
120 void update(const HybridNonlinearFactorGraph& newFactors,
│ │ │ +
121 const Values& initialValues,
│ │ │ +
122 const boost::optional<size_t>& maxNrLeaves = boost::none,
│ │ │ +
123 const boost::optional<Ordering>& ordering = boost::none);
│ │ │ +
124
│ │ │ +
126 void reorder_relinearize();
│ │ │ +
127
│ │ │ +
129};
│ │ │
130
│ │ │ -
138 AlgebraicDecisionTree<Key> error(const VectorValues &continuousValues) const;
│ │ │ -
139
│ │ │ -
144 double error(const HybridValues &values) const override;
│ │ │ -
145
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
149 sum = factor.add(sum);
│ │ │ -
150 return sum;
│ │ │ -
151 }
│ │ │ -
│ │ │ -
153
│ │ │ -
154 private:
│ │ │ -
156 friend class boost::serialization::access;
│ │ │ -
157 template <class ARCHIVE>
│ │ │ -
158 void serialize(ARCHIVE &ar, const unsigned int /*version*/) {
│ │ │ -
159 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ -
160 ar &BOOST_SERIALIZATION_NVP(factors_);
│ │ │ -
161 }
│ │ │ -
162};
│ │ │ -
│ │ │ -
163
│ │ │ -
164// traits
│ │ │ -
165template <>
│ │ │ -
│ │ │ -
166struct traits<GaussianMixtureFactor> : public Testable<GaussianMixtureFactor> {
│ │ │ -
167};
│ │ │ -
│ │ │ -
168
│ │ │ -
169} // namespace gtsam
│ │ │ -
specialized key for discrete variables
│ │ │ -
Decision Tree for use in DiscreteFactors.
│ │ │ -
Algebraic Decision Trees.
│ │ │ - │ │ │ -
Linear Factor Graph where all factors are Gaussians.
│ │ │ -
A factor with a quadratic error function - a Gaussian.
│ │ │ +
131} // namespace gtsam
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +
Nonlinear hybrid factor graph that uses type erasure.
│ │ │
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
│ │ │
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
│ │ │ -
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
│ │ │ - │ │ │ -
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
│ │ │ -
Implementation of a discrete conditional mixture factor.
Definition GaussianMixtureFactor.h:47
│ │ │ -
GaussianMixtureFactor()=default
Default constructor, mainly for serialization.
│ │ │ -
GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const std::vector< sharedFactor > &factors)
Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers.
Definition GaussianMixtureFactor.h:98
│ │ │ -
GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const
Combine the Gaussian Factor Graphs in sum and this while maintaining the original tree structure.
Definition GaussianMixtureFactor.cpp:85
│ │ │ -
friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const GaussianMixtureFactor &factor)
Add MixtureFactor to a Sum, syntactic sugar.
Definition GaussianMixtureFactor.h:147
│ │ │ -
Base class for truly hybrid probabilistic factors.
Definition HybridFactor.h:52
│ │ │ -
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ -
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ -
The Factor::error simply extracts the.
│ │ │ -
the error.
│ │ │ -
The Factor::error simply extracts the.
│ │ │ +
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridBayesTree.cpp:175
│ │ │ +
Definition HybridGaussianISAM.h:34
│ │ │ +
Definition HybridNonlinearFactorGraph.h:33
│ │ │ +
Wrapper class to manage ISAM in a nonlinear context.
Definition HybridNonlinearISAM.h:27
│ │ │ +
const HybridNonlinearFactorGraph & getFactorsUnsafe() const
get underlying nonlinear graph
Definition HybridNonlinearISAM.h:96
│ │ │ +
DiscreteValues assignment_
The discrete assignment.
Definition HybridNonlinearISAM.h:36
│ │ │ +
const Values & getLinearizationPoint() const
Return the current linearization point.
Definition HybridNonlinearISAM.h:90
│ │ │ +
HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph::Eliminate &eliminationFunction=HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
Periodically reorder and relinearize.
Definition HybridNonlinearISAM.h:59
│ │ │ +
HybridNonlinearFactorGraph factors_
The original factors, used when relinearizing.
Definition HybridNonlinearISAM.h:39
│ │ │ +
const DiscreteValues & assignment() const
Return the current discrete assignment.
Definition HybridNonlinearISAM.h:93
│ │ │ +
int reorderCounter() const
TODO: comment.
Definition HybridNonlinearISAM.h:102
│ │ │ +
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition HybridNonlinearISAM.h:87
│ │ │ +
int reorderInterval_
The reordering interval and counter.
Definition HybridNonlinearISAM.h:42
│ │ │ +
int reorderInterval() const
get counters
Definition HybridNonlinearISAM.h:101
│ │ │ +
Values linPoint_
The current linearization point.
Definition HybridNonlinearISAM.h:33
│ │ │ +
gtsam::HybridGaussianISAM isam_
The internal iSAM object.
Definition HybridNonlinearISAM.h:30
│ │ │ +
HybridGaussianFactorGraph::Eliminate eliminationFunction_
The elimination function.
Definition HybridNonlinearISAM.h:46
│ │ │ +
const HybridGaussianISAM & bayesTree() const
access the underlying bayes tree
Definition HybridNonlinearISAM.h:80
│ │ │ +
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
Definition EliminateableFactorGraph.h:89
│ │ │ +
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,191 +1,191 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -GaussianMixtureFactor.h │ │ │ │ +HybridNonlinearISAM.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 │ │ │ │ +18#pragma once │ │ │ │ +19 │ │ │ │ +20#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._h> │ │ │ │ +21#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ 22 │ │ │ │ -23#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> │ │ │ │ -24#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> │ │ │ │ -25#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> │ │ │ │ -26#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h> │ │ │ │ -28#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ -29 │ │ │ │ -30namespace _g_t_s_a_m { │ │ │ │ +23namespace _g_t_s_a_m { │ │ │ │ +_2_7class GTSAM_EXPORT _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M { │ │ │ │ +28 protected: │ │ │ │ +_3_0 _g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M _i_s_a_m__; │ │ │ │ 31 │ │ │ │ -32class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ -33class _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ -34class _V_e_c_t_o_r_V_a_l_u_e_s; │ │ │ │ -35 │ │ │ │ -_4_7class GTSAM_EXPORT _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r : public _H_y_b_r_i_d_F_a_c_t_o_r { │ │ │ │ +_3_3 _V_a_l_u_e_s _l_i_n_P_o_i_n_t__; │ │ │ │ +34 │ │ │ │ +_3_6 _D_i_s_c_r_e_t_e_V_a_l_u_e_s _a_s_s_i_g_n_m_e_n_t__; │ │ │ │ +37 │ │ │ │ +_3_9 _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h _f_a_c_t_o_r_s__; │ │ │ │ +40 │ │ │ │ +_4_2 int _r_e_o_r_d_e_r_I_n_t_e_r_v_a_l__; │ │ │ │ +43 int reorderCounter_; │ │ │ │ +44 │ │ │ │ +_4_6 _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_E_l_i_m_i_n_a_t_e _e_l_i_m_i_n_a_t_i_o_n_F_u_n_c_t_i_o_n__; │ │ │ │ +47 │ │ │ │ 48 public: │ │ │ │ -49 using _B_a_s_e = _H_y_b_r_i_d_F_a_c_t_o_r; │ │ │ │ -50 using _T_h_i_s = _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r; │ │ │ │ -51 using shared_ptr = boost::shared_ptr; │ │ │ │ -52 │ │ │ │ -53 using sharedFactor = boost::shared_ptr; │ │ │ │ -54 │ │ │ │ -_5_6 using _F_a_c_t_o_r_s = _D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_,_ _s_h_a_r_e_d_F_a_c_t_o_r_>; │ │ │ │ -57 │ │ │ │ -58 private: │ │ │ │ -60 _F_a_c_t_o_r_s factors_; │ │ │ │ -61 │ │ │ │ -68 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e asGaussianFactorGraphTree() const; │ │ │ │ -69 │ │ │ │ -70 public: │ │ │ │ +51 │ │ │ │ +_5_9 _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M( │ │ │ │ +60 int reorderInterval = 1, │ │ │ │ +61 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_:_:_E_l_i_m_i_n_a_t_e& eliminationFunction = │ │ │ │ +62 HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate) │ │ │ │ +63 : reorderInterval_(reorderInterval), │ │ │ │ +64 reorderCounter_(0), │ │ │ │ +65 eliminationFunction_(eliminationFunction) {} │ │ │ │ +66 │ │ │ │ +70 │ │ │ │ +72 _V_a_l_u_e_s estimate(); │ │ │ │ 73 │ │ │ │ -_7_5 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r() = default; │ │ │ │ +74 // /** find the marginal covariance for a single variable */ │ │ │ │ +75 // Matrix marginalCovariance(Key key) const; │ │ │ │ 76 │ │ │ │ -86 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ -87 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys, │ │ │ │ -88 const _F_a_c_t_o_r_s &factors); │ │ │ │ -89 │ │ │ │ -_9_8 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ -99 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys, │ │ │ │ -100 const std::vector &factors) │ │ │ │ -101 : _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(continuousKeys, discreteKeys, │ │ │ │ -102 _F_a_c_t_o_r_s(discreteKeys, factors)) {} │ │ │ │ +77 // access │ │ │ │ +78 │ │ │ │ +_8_0 const _H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M& _b_a_y_e_s_T_r_e_e() const { return isam_; } │ │ │ │ +81 │ │ │ │ +_8_7 void _p_r_u_n_e(const size_t maxNumberLeaves) { isam_._p_r_u_n_e(maxNumberLeaves); } │ │ │ │ +88 │ │ │ │ +_9_0 const _V_a_l_u_e_s& _g_e_t_L_i_n_e_a_r_i_z_a_t_i_o_n_P_o_i_n_t() const { return linPoint_; } │ │ │ │ +91 │ │ │ │ +_9_3 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s& _a_s_s_i_g_n_m_e_n_t() const { return assignment_; } │ │ │ │ +94 │ │ │ │ +_9_6 const _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h& _g_e_t_F_a_c_t_o_r_s_U_n_s_a_f_e() const { │ │ │ │ +97 return factors_; │ │ │ │ +98 } │ │ │ │ +99 │ │ │ │ +_1_0_1 int _r_e_o_r_d_e_r_I_n_t_e_r_v_a_l() const { return reorderInterval_; } │ │ │ │ +_1_0_2 int _r_e_o_r_d_e_r_C_o_u_n_t_e_r() const { return reorderCounter_; } │ │ │ │ 103 │ │ │ │ +105 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ +106 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ 107 │ │ │ │ -108 bool _e_q_u_a_l_s(const _H_y_b_r_i_d_F_a_c_t_o_r &lf, double tol = 1e-9) const override; │ │ │ │ -109 │ │ │ │ -110 void _p_r_i_n_t( │ │ │ │ -111 const std::string &s = "GaussianMixtureFactor\n", │ │ │ │ -112 const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = DefaultKeyFormatter) const override; │ │ │ │ -113 │ │ │ │ -117 │ │ │ │ -119 sharedFactor operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ -120 │ │ │ │ -129 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e add(const _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum) const; │ │ │ │ +109 void printStats() const; │ │ │ │ +110 │ │ │ │ +112 void saveGraph(const std::string& s, │ │ │ │ +113 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ +114 │ │ │ │ +118 │ │ │ │ +120 void update(const _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h& newFactors, │ │ │ │ +121 const _V_a_l_u_e_s& initialValues, │ │ │ │ +122 const boost::optional& maxNrLeaves = boost::none, │ │ │ │ +123 const boost::optional& ordering = boost::none); │ │ │ │ +124 │ │ │ │ +126 void reorder_relinearize(); │ │ │ │ +127 │ │ │ │ +129}; │ │ │ │ 130 │ │ │ │ -138 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> error(const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) │ │ │ │ -const; │ │ │ │ -139 │ │ │ │ -144 double error(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const override; │ │ │ │ -145 │ │ │ │ -_1_4_7 friend _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &_o_p_e_r_a_t_o_r_+_=( │ │ │ │ -148 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum, const _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r &factor) { │ │ │ │ -149 sum = factor._a_d_d(sum); │ │ │ │ -150 return sum; │ │ │ │ -151 } │ │ │ │ -153 │ │ │ │ -154 private: │ │ │ │ -_1_5_6 friend class boost::serialization::access; │ │ │ │ -157 template │ │ │ │ -158 void serialize(ARCHIVE &ar, const unsigned int /*version*/) { │ │ │ │ -159 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ -160 ar &BOOST_SERIALIZATION_NVP(factors_); │ │ │ │ -161 } │ │ │ │ -162}; │ │ │ │ -163 │ │ │ │ -164// traits │ │ │ │ -165template <> │ │ │ │ -_1_6_6struct _t_r_a_i_t_s<_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r> : public │ │ │ │ -_T_e_s_t_a_b_l_e { │ │ │ │ -167}; │ │ │ │ -168 │ │ │ │ -169} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ -specialized key for discrete variables │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ -Decision Tree for use in DiscreteFactors. │ │ │ │ -_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. │ │ │ │ -_H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ -_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ -Linear Factor Graph where all factors are Gaussians. │ │ │ │ -_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h │ │ │ │ -A factor with a quadratic error function - a Gaussian. │ │ │ │ +131} // namespace gtsam │ │ │ │ +_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M_._h │ │ │ │ +_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ _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_:_:_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_:_:_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_<_ _K_e_y_,_ _s_h_a_r_e_d_F_a_c_t_o_r_ _> │ │ │ │ -_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_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ -Implementation of a discrete conditional mixture factor. │ │ │ │ -DDeeffiinniittiioonn GaussianMixtureFactor.h:47 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ -GaussianMixtureFactor()=default │ │ │ │ -Default constructor, mainly for serialization. │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ -GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys │ │ │ │ -&discreteKeys, const std::vector< sharedFactor > &factors) │ │ │ │ -Construct a new GaussianMixtureFactor object using a vector of GaussianFactor │ │ │ │ -shared pointers. │ │ │ │ -DDeeffiinniittiioonn GaussianMixtureFactor.h:98 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_a_d_d │ │ │ │ -GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const │ │ │ │ -Combine the Gaussian Factor Graphs in sum and this while maintaining the │ │ │ │ -original tree structure. │ │ │ │ -DDeeffiinniittiioonn GaussianMixtureFactor.cpp:85 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ -friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const │ │ │ │ -GaussianMixtureFactor &factor) │ │ │ │ -Add MixtureFactor to a Sum, syntactic sugar. │ │ │ │ -DDeeffiinniittiioonn GaussianMixtureFactor.h:147 │ │ │ │ -_g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ -Base class for truly hybrid probabilistic factors. │ │ │ │ -DDeeffiinniittiioonn HybridFactor.h:52 │ │ │ │ -_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_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ -VectorValues represents a collection of vector-valued variables associated each │ │ │ │ -with a unique integer... │ │ │ │ -DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ -_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ -The Factor::error simply extracts the. │ │ │ │ -_H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ -the error. │ │ │ │ -_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ -The Factor::error simply extracts the. │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_B_a_y_e_s_T_r_e_e_:_:_p_r_u_n_e │ │ │ │ +void prune(const size_t maxNumberLeaves) │ │ │ │ +Prune the underlying Bayes tree. │ │ │ │ +DDeeffiinniittiioonn HybridBayesTree.cpp:175 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_G_a_u_s_s_i_a_n_I_S_A_M │ │ │ │ +DDeeffiinniittiioonn HybridGaussianISAM.h:34 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearFactorGraph.h:33 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ +Wrapper class to manage ISAM in a nonlinear context. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:27 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_g_e_t_F_a_c_t_o_r_s_U_n_s_a_f_e │ │ │ │ +const HybridNonlinearFactorGraph & getFactorsUnsafe() const │ │ │ │ +get underlying nonlinear graph │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:96 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_a_s_s_i_g_n_m_e_n_t__ │ │ │ │ +DiscreteValues assignment_ │ │ │ │ +The discrete assignment. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:36 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_g_e_t_L_i_n_e_a_r_i_z_a_t_i_o_n_P_o_i_n_t │ │ │ │ +const Values & getLinearizationPoint() const │ │ │ │ +Return the current linearization point. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:90 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M │ │ │ │ +HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph:: │ │ │ │ +Eliminate &eliminationFunction=HybridGaussianFactorGraph:: │ │ │ │ +EliminationTraitsType::DefaultEliminate) │ │ │ │ +Periodically reorder and relinearize. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:59 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_f_a_c_t_o_r_s__ │ │ │ │ +HybridNonlinearFactorGraph factors_ │ │ │ │ +The original factors, used when relinearizing. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:39 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_a_s_s_i_g_n_m_e_n_t │ │ │ │ +const DiscreteValues & assignment() const │ │ │ │ +Return the current discrete assignment. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:93 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_C_o_u_n_t_e_r │ │ │ │ +int reorderCounter() const │ │ │ │ +TODO: comment. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:102 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_p_r_u_n_e │ │ │ │ +void prune(const size_t maxNumberLeaves) │ │ │ │ +Prune the underlying Bayes tree. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:87 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_I_n_t_e_r_v_a_l__ │ │ │ │ +int reorderInterval_ │ │ │ │ +The reordering interval and counter. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:42 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_r_e_o_r_d_e_r_I_n_t_e_r_v_a_l │ │ │ │ +int reorderInterval() const │ │ │ │ +get counters │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:101 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_l_i_n_P_o_i_n_t__ │ │ │ │ +Values linPoint_ │ │ │ │ +The current linearization point. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:33 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_i_s_a_m__ │ │ │ │ +gtsam::HybridGaussianISAM isam_ │ │ │ │ +The internal iSAM object. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:30 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_e_l_i_m_i_n_a_t_i_o_n_F_u_n_c_t_i_o_n__ │ │ │ │ +HybridGaussianFactorGraph::Eliminate eliminationFunction_ │ │ │ │ +The elimination function. │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:46 │ │ │ │ +_g_t_s_a_m_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_:_:_b_a_y_e_s_T_r_e_e │ │ │ │ +const HybridGaussianISAM & bayesTree() const │ │ │ │ +access the underlying bayes tree │ │ │ │ +DDeeffiinniittiioonn HybridNonlinearISAM.h:80 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_e_a_b_l_e_F_a_c_t_o_r_G_r_a_p_h_<_ _H_y_b_r_i_d_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_ _>_:_:_E_l_i_m_i_n_a_t_e │ │ │ │ +std::function< EliminationResult(const FactorGraphType &, const Ordering &)> │ │ │ │ +Eliminate │ │ │ │ +The function type that does a single dense elimination step on a subgraph. │ │ │ │ +DDeeffiinniittiioonn EliminateableFactorGraph.h:89 │ │ │ │ +_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 │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h │ │ │ │ + * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_I_S_A_M_._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/a00563.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/HybridNonlinearFactorGraph.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,40 +94,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
GaussianMixtureFactor.cpp File Reference
│ │ │ +
HybridNonlinearFactorGraph.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

A set of Gaussian factors indexed by a set of discrete keys. │ │ │ +

Nonlinear hybrid factor graph that uses type erasure. │ │ │ More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ +Classes

class  gtsam::HybridNonlinearFactorGraph
 
struct  gtsam::traits< HybridNonlinearFactorGraph >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -

A set of Gaussian factors indexed by a set of discrete keys.

│ │ │ -
Author
Fan Jiang
│ │ │ -
│ │ │ -Varun Agrawal
│ │ │ -
│ │ │ -Frank Dellaert
│ │ │ -
Date
Mar 12, 2022
│ │ │ +

Nonlinear hybrid factor graph that uses type erasure.

│ │ │ +
Author
Varun Agrawal
│ │ │ +
Date
May 28, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,24 +1,28 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -GaussianMixtureFactor.cpp File Reference │ │ │ │ -A set of Gaussian factors indexed by a set of discrete keys. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +HybridNonlinearFactorGraph.h File Reference │ │ │ │ +Nonlinear hybrid factor graph that uses type erasure. _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_:_:_H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_F_a_c_t_o_r_G_r_a_p_h_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A set of Gaussian factors indexed by a set of discrete keys. │ │ │ │ +Nonlinear hybrid factor graph that uses type erasure. │ │ │ │ Author │ │ │ │ - Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ - Frank Dellaert │ │ │ │ Date │ │ │ │ - Mar 12, 2022 │ │ │ │ + May 28, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._c_p_p │ │ │ │ + * _H_y_b_r_i_d_N_o_n_l_i_n_e_a_r_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/a00566.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixture.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,56 +95,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
GaussianMixture.h File Reference
│ │ │ +Namespaces
│ │ │ +
GaussianMixtureFactor.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ +

A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::GaussianMixture
 A conditional of gaussian mixtures indexed by discrete variables, as part of a Bayes Network. More...
class  gtsam::GaussianMixtureFactor
 Implementation of a discrete conditional mixture factor. More...
 
struct  gtsam::traits< GaussianMixture >
struct  gtsam::traits< GaussianMixtureFactor >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

│ │ │ -std::set< DiscreteKeygtsam::DiscreteKeysAsSet (const DiscreteKeys &discreteKeys)
 Return the DiscreteKey vector as a set.
 
│ │ │

Detailed Description

│ │ │ -

A hybrid conditional in the Conditional Linear Gaussian scheme.

│ │ │ +

A set of GaussianFactors, indexed by a set of discrete keys.

│ │ │
Author
Fan Jiang
│ │ │
│ │ │ -Varun Agrawal
│ │ │ +Varun Agrawal │ │ │ +
│ │ │ +Frank Dellaert
│ │ │
Date
Mar 12, 2022
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +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 │ │ │ │ -GaussianMixture.h File Reference │ │ │ │ -A hybrid conditional in the Conditional Linear Gaussian scheme. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +GaussianMixtureFactor.h File Reference │ │ │ │ +A set of GaussianFactors, indexed by a set of discrete keys. _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_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ -  A conditional of gaussian mixtures indexed by discrete variables, as │ │ │ │ - part of a Bayes Network. _M_o_r_e_._._. │ │ │ │ + class   _g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ +  Implementation of a discrete conditional mixture factor. _M_o_r_e_._._. │ │ │ │   │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_ _> │ │ │ │ +struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_ _> │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -std::set< _D_i_s_c_r_e_t_e_K_e_y >  ggttssaamm::::DDiissccrreetteeKKeeyyssAAssSSeett (const _D_i_s_c_r_e_t_e_K_e_y_s │ │ │ │ - &discreteKeys) │ │ │ │ -  Return the DiscreteKey vector as a set. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -A hybrid conditional in the Conditional Linear Gaussian scheme. │ │ │ │ +A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ │ Author │ │ │ │ Fan Jiang │ │ │ │ Varun Agrawal │ │ │ │ + Frank Dellaert │ │ │ │ Date │ │ │ │ Mar 12, 2022 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_._h │ │ │ │ + * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_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/a00566.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,3 @@ │ │ │ │ var a00566 = [ │ │ │ │ - ["gtsam::traits< GaussianMixture >", "a03396.html", null], │ │ │ │ - ["DiscreteKeysAsSet", "a00566.html#ad92a1966f54e02a7c2ce061c1228c7b3", null] │ │ │ │ + ["gtsam::traits< GaussianMixtureFactor >", "a03404.html", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00566_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixture.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/hybrid/GaussianMixtureFactor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,182 +98,149 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
GaussianMixture.h
│ │ │ +
GaussianMixtureFactor.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/discrete/DecisionTree-inl.h>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
30
│ │ │ -
31namespace gtsam {
│ │ │ -
32
│ │ │ -
33class HybridValues;
│ │ │ -
34
│ │ │ -
│ │ │ -
53class GTSAM_EXPORT GaussianMixture
│ │ │ -
54 : public HybridFactor,
│ │ │ -
55 public Conditional<HybridFactor, GaussianMixture> {
│ │ │ -
56 public:
│ │ │ -
57 using This = GaussianMixture;
│ │ │ -
58 using shared_ptr = boost::shared_ptr<GaussianMixture>;
│ │ │ - │ │ │ - │ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
29
│ │ │ +
30namespace gtsam {
│ │ │ +
31
│ │ │ +
32class HybridValues;
│ │ │ +
33class DiscreteValues;
│ │ │ +
34class VectorValues;
│ │ │ +
35
│ │ │ +
│ │ │ +
47class GTSAM_EXPORT GaussianMixtureFactor : public HybridFactor {
│ │ │ +
48 public:
│ │ │ +
49 using Base = HybridFactor;
│ │ │ + │ │ │ +
51 using shared_ptr = boost::shared_ptr<This>;
│ │ │ +
52
│ │ │ +
53 using sharedFactor = boost::shared_ptr<GaussianFactor>;
│ │ │ +
54
│ │ │ + │ │ │ +
57
│ │ │ +
58 private:
│ │ │ +
60 Factors factors_;
│ │ │
61
│ │ │ - │ │ │ -
64
│ │ │ -
65 private:
│ │ │ -
66 Conditionals conditionals_;
│ │ │ -
67 double logConstant_;
│ │ │ -
68
│ │ │ -
72 GaussianFactorGraphTree asGaussianFactorGraphTree() const;
│ │ │ +
68 GaussianFactorGraphTree asGaussianFactorGraphTree() const;
│ │ │ +
69
│ │ │ +
70 public:
│ │ │
73
│ │ │ - │ │ │ - │ │ │ -
83 prunerFunc(const DecisionTreeFactor &decisionTree);
│ │ │ -
84
│ │ │ -
85 public:
│ │ │ -
88
│ │ │ -
90 GaussianMixture() = default;
│ │ │ -
91
│ │ │ -
103 GaussianMixture(const KeyVector &continuousFrontals,
│ │ │ -
104 const KeyVector &continuousParents,
│ │ │ -
105 const DiscreteKeys &discreteParents,
│ │ │ -
106 const Conditionals &conditionals);
│ │ │ + │ │ │ +
76
│ │ │ +
86 GaussianMixtureFactor(const KeyVector &continuousKeys,
│ │ │ +
87 const DiscreteKeys &discreteKeys,
│ │ │ +
88 const Factors &factors);
│ │ │ +
89
│ │ │ +
│ │ │ +
98 GaussianMixtureFactor(const KeyVector &continuousKeys,
│ │ │ +
99 const DiscreteKeys &discreteKeys,
│ │ │ +
100 const std::vector<sharedFactor> &factors)
│ │ │ +
101 : GaussianMixtureFactor(continuousKeys, discreteKeys,
│ │ │ +
102 Factors(discreteKeys, factors)) {}
│ │ │ +
│ │ │ +
103
│ │ │
107
│ │ │ -
116 GaussianMixture(KeyVector &&continuousFrontals, KeyVector &&continuousParents,
│ │ │ -
117 DiscreteKeys &&discreteParents,
│ │ │ -
118 std::vector<GaussianConditional::shared_ptr> &&conditionals);
│ │ │ -
119
│ │ │ - │ │ │ -
129 const KeyVector &continuousFrontals, const KeyVector &continuousParents,
│ │ │ -
130 const DiscreteKeys &discreteParents,
│ │ │ -
131 const std::vector<GaussianConditional::shared_ptr> &conditionals);
│ │ │ -
132
│ │ │ -
136
│ │ │ -
138 bool equals(const HybridFactor &lf, double tol = 1e-9) const override;
│ │ │ +
108 bool equals(const HybridFactor &lf, double tol = 1e-9) const override;
│ │ │ +
109
│ │ │ +
110 void print(
│ │ │ +
111 const std::string &s = "GaussianMixtureFactor\n",
│ │ │ +
112 const KeyFormatter &formatter = DefaultKeyFormatter) const override;
│ │ │ +
113
│ │ │ +
117
│ │ │ +
119 sharedFactor operator()(const DiscreteValues &assignment) const;
│ │ │ +
120
│ │ │ + │ │ │ +
130
│ │ │ +
138 AlgebraicDecisionTree<Key> error(const VectorValues &continuousValues) const;
│ │ │
139
│ │ │ -
141 void print(
│ │ │ -
142 const std::string &s = "GaussianMixture\n",
│ │ │ -
143 const KeyFormatter &formatter = DefaultKeyFormatter) const override;
│ │ │ -
144
│ │ │ -
148
│ │ │ - │ │ │ -
151 const DiscreteValues &discreteValues) const;
│ │ │ -
152
│ │ │ -
154 size_t nrComponents() const;
│ │ │ -
155
│ │ │ -
157 KeyVector continuousParents() const;
│ │ │ -
158
│ │ │ -
161 double logNormalizationConstant() const override { return logConstant_; }
│ │ │ -
162
│ │ │ -
167 boost::shared_ptr<GaussianMixtureFactor> likelihood(
│ │ │ -
168 const VectorValues &given) const;
│ │ │ -
169
│ │ │ -
171 const Conditionals &conditionals() const;
│ │ │ -
172
│ │ │ -
180 AlgebraicDecisionTree<Key> logProbability(
│ │ │ -
181 const VectorValues &continuousValues) const;
│ │ │ -
182
│ │ │ -
208 double error(const HybridValues &values) const override;
│ │ │ -
209
│ │ │ -
217 AlgebraicDecisionTree<Key> error(const VectorValues &continuousValues) const;
│ │ │ -
218
│ │ │ -
225 double logProbability(const HybridValues &values) const override;
│ │ │ -
226
│ │ │ -
228 double evaluate(const HybridValues &values) const override;
│ │ │ -
229
│ │ │ -
│ │ │ -
231 double operator()(const HybridValues &values) const {
│ │ │ -
232 return evaluate(values);
│ │ │ -
233 }
│ │ │ -
│ │ │ -
234
│ │ │ -
242 void prune(const DecisionTreeFactor &decisionTree);
│ │ │ -
243
│ │ │ - │ │ │ -
253
│ │ │ -
254 private:
│ │ │ -
256 bool allFrontalsGiven(const VectorValues &given) const;
│ │ │ -
257
│ │ │ -
259 friend class boost::serialization::access;
│ │ │ -
260 template <class Archive>
│ │ │ -
261 void serialize(Archive &ar, const unsigned int /*version*/) {
│ │ │ -
262 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
│ │ │ -
263 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
│ │ │ -
264 ar &BOOST_SERIALIZATION_NVP(conditionals_);
│ │ │ -
265 }
│ │ │ -
266};
│ │ │ -
│ │ │ -
267
│ │ │ -
269std::set<DiscreteKey> DiscreteKeysAsSet(const DiscreteKeys &discreteKeys);
│ │ │ -
270
│ │ │ -
271// traits
│ │ │ -
272template <>
│ │ │ -
273struct traits<GaussianMixture> : public Testable<GaussianMixture> {};
│ │ │ -
274
│ │ │ -
275} // namespace gtsam
│ │ │ -
specialized key for discrete variables
│ │ │ - │ │ │ -
Decision Tree for use in DiscreteFactors.
│ │ │ - │ │ │ -
A set of GaussianFactors, indexed by a set of discrete keys.
│ │ │ -
Base class for conditional densities.
│ │ │ -
Conditional Gaussian Base class.
│ │ │ +
144 double error(const HybridValues &values) const override;
│ │ │ +
145
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
149 sum = factor.add(sum);
│ │ │ +
150 return sum;
│ │ │ +
151 }
│ │ │ +
│ │ │ +
153
│ │ │ +
154 private:
│ │ │ +
156 friend class boost::serialization::access;
│ │ │ +
157 template <class ARCHIVE>
│ │ │ +
158 void serialize(ARCHIVE &ar, const unsigned int /*version*/) {
│ │ │ +
159 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
│ │ │ +
160 ar &BOOST_SERIALIZATION_NVP(factors_);
│ │ │ +
161 }
│ │ │ +
162};
│ │ │ +
│ │ │ +
163
│ │ │ +
164// traits
│ │ │ +
165template <>
│ │ │ +
│ │ │ +
166struct traits<GaussianMixtureFactor> : public Testable<GaussianMixtureFactor> {
│ │ │ +
167};
│ │ │ +
│ │ │ +
168
│ │ │ +
169} // namespace gtsam
│ │ │ +
Decision Tree for use in DiscreteFactors.
│ │ │ +
specialized key for discrete variables
│ │ │ +
Algebraic Decision Trees.
│ │ │ + │ │ │ +
A factor with a quadratic error function - a Gaussian.
│ │ │ +
Linear Factor Graph where all factors are Gaussians.
│ │ │
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
│ │ │
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
│ │ │ -
std::set< DiscreteKey > DiscreteKeysAsSet(const DiscreteKeys &discreteKeys)
Return the DiscreteKey vector as a set.
Definition GaussianMixture.cpp:221
│ │ │
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
│ │ │ -
std::function< double(const Assignment< Key > &, double)> prunerFunc(const DecisionTreeFactor &prunedDecisionTree, const HybridConditional &conditional)
Helper function to get the pruner functional.
Definition HybridBayesNet.cpp:66
│ │ │
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
│ │ │ -
An assignment from labels to value index (size_t).
Definition Assignment.h:37
│ │ │ - │ │ │ -
A discrete probabilistic factor.
Definition DecisionTreeFactor.h:45
│ │ │ + │ │ │
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
│ │ │ -
A conditional of gaussian mixtures indexed by discrete variables, as part of a Bayes Network.
Definition GaussianMixture.h:55
│ │ │ -
double logNormalizationConstant() const override
The log normalization constant is max of the the individual log-normalization constants.
Definition GaussianMixture.h:161
│ │ │ -
double operator()(const HybridValues &values) const
Evaluate probability density, sugar.
Definition GaussianMixture.h:231
│ │ │ -
GaussianMixture()=default
Default constructor, mainly for serialization.
│ │ │ +
Implementation of a discrete conditional mixture factor.
Definition GaussianMixtureFactor.h:47
│ │ │ +
GaussianMixtureFactor()=default
Default constructor, mainly for serialization.
│ │ │ +
GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys, const std::vector< sharedFactor > &factors)
Construct a new GaussianMixtureFactor object using a vector of GaussianFactor shared pointers.
Definition GaussianMixtureFactor.h:98
│ │ │ +
GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const
Combine the Gaussian Factor Graphs in sum and this while maintaining the original tree structure.
Definition GaussianMixtureFactor.cpp:85
│ │ │ +
friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const GaussianMixtureFactor &factor)
Add MixtureFactor to a Sum, syntactic sugar.
Definition GaussianMixtureFactor.h:147
│ │ │
Base class for truly hybrid probabilistic factors.
Definition HybridFactor.h:52
│ │ │
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ -
Definition Conditional.h:64
│ │ │ -
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition GaussianConditional.h:46
│ │ │
VectorValues represents a collection of vector-valued variables associated each with a unique integer...
Definition VectorValues.h:74
│ │ │ +
The Factor::error simply extracts the.
│ │ │
the error.
│ │ │ +
The Factor::error simply extracts the.
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,236 +1,191 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -GaussianMixture.h │ │ │ │ +GaussianMixtureFactor.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 <_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> │ │ │ │ -24#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> │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#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> │ │ │ │ +24#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> │ │ │ │ 25#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> │ │ │ │ -26#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h> │ │ │ │ -27#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ -28#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> │ │ │ │ -29#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_._h> │ │ │ │ -30 │ │ │ │ -31namespace _g_t_s_a_m { │ │ │ │ -32 │ │ │ │ -33class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ -34 │ │ │ │ -_5_3class GTSAM_EXPORT _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ -54 : public _H_y_b_r_i_d_F_a_c_t_o_r, │ │ │ │ -55 public _C_o_n_d_i_t_i_o_n_a_l { │ │ │ │ -56 public: │ │ │ │ -57 using _T_h_i_s = _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e; │ │ │ │ -58 using shared_ptr = boost::shared_ptr; │ │ │ │ -59 using _B_a_s_e_F_a_c_t_o_r = _H_y_b_r_i_d_F_a_c_t_o_r; │ │ │ │ -60 using _B_a_s_e_C_o_n_d_i_t_i_o_n_a_l = _C_o_n_d_i_t_i_o_n_a_l_<_H_y_b_r_i_d_F_a_c_t_o_r_,_ _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_>; │ │ │ │ +26#include <_g_t_s_a_m_/_h_y_b_r_i_d_/_H_y_b_r_i_d_F_a_c_t_o_r_._h> │ │ │ │ +27#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h> │ │ │ │ +28#include <_g_t_s_a_m_/_l_i_n_e_a_r_/_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h> │ │ │ │ +29 │ │ │ │ +30namespace _g_t_s_a_m { │ │ │ │ +31 │ │ │ │ +32class _H_y_b_r_i_d_V_a_l_u_e_s; │ │ │ │ +33class _D_i_s_c_r_e_t_e_V_a_l_u_e_s; │ │ │ │ +34class _V_e_c_t_o_r_V_a_l_u_e_s; │ │ │ │ +35 │ │ │ │ +_4_7class GTSAM_EXPORT _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r : public _H_y_b_r_i_d_F_a_c_t_o_r { │ │ │ │ +48 public: │ │ │ │ +49 using _B_a_s_e = _H_y_b_r_i_d_F_a_c_t_o_r; │ │ │ │ +50 using _T_h_i_s = _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r; │ │ │ │ +51 using shared_ptr = boost::shared_ptr; │ │ │ │ +52 │ │ │ │ +53 using sharedFactor = boost::shared_ptr; │ │ │ │ +54 │ │ │ │ +_5_6 using _F_a_c_t_o_r_s = _D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_,_ _s_h_a_r_e_d_F_a_c_t_o_r_>; │ │ │ │ +57 │ │ │ │ +58 private: │ │ │ │ +60 _F_a_c_t_o_r_s factors_; │ │ │ │ 61 │ │ │ │ -_6_3 using _C_o_n_d_i_t_i_o_n_a_l_s = _D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_,_ _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r_>; │ │ │ │ -64 │ │ │ │ -65 private: │ │ │ │ -66 _C_o_n_d_i_t_i_o_n_a_l_s conditionals_; │ │ │ │ -67 double logConstant_; │ │ │ │ -68 │ │ │ │ -72 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e asGaussianFactorGraphTree() const; │ │ │ │ +68 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e asGaussianFactorGraphTree() const; │ │ │ │ +69 │ │ │ │ +70 public: │ │ │ │ 73 │ │ │ │ -81 std::function<_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r( │ │ │ │ -82 const _A_s_s_i_g_n_m_e_n_t_<_K_e_y_> &, const _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r &)> │ │ │ │ -83 _p_r_u_n_e_r_F_u_n_c(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r &decisionTree); │ │ │ │ -84 │ │ │ │ -85 public: │ │ │ │ -88 │ │ │ │ -_9_0 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e() = default; │ │ │ │ -91 │ │ │ │ -103 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e(const _K_e_y_V_e_c_t_o_r &continuousFrontals, │ │ │ │ -104 const _K_e_y_V_e_c_t_o_r &continuousParents, │ │ │ │ -105 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteParents, │ │ │ │ -106 const _C_o_n_d_i_t_i_o_n_a_l_s &conditionals); │ │ │ │ +_7_5 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r() = default; │ │ │ │ +76 │ │ │ │ +86 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ +87 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys, │ │ │ │ +88 const _F_a_c_t_o_r_s &factors); │ │ │ │ +89 │ │ │ │ +_9_8 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(const _K_e_y_V_e_c_t_o_r &continuousKeys, │ │ │ │ +99 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteKeys, │ │ │ │ +100 const std::vector &factors) │ │ │ │ +101 : _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r(continuousKeys, discreteKeys, │ │ │ │ +102 _F_a_c_t_o_r_s(discreteKeys, factors)) {} │ │ │ │ +103 │ │ │ │ 107 │ │ │ │ -116 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e(_K_e_y_V_e_c_t_o_r &&continuousFrontals, _K_e_y_V_e_c_t_o_r │ │ │ │ -&&continuousParents, │ │ │ │ -117 _D_i_s_c_r_e_t_e_K_e_y_s &&discreteParents, │ │ │ │ -118 std::vector &&conditionals); │ │ │ │ -119 │ │ │ │ -128 _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e( │ │ │ │ -129 const _K_e_y_V_e_c_t_o_r &continuousFrontals, const _K_e_y_V_e_c_t_o_r &continuousParents, │ │ │ │ -130 const _D_i_s_c_r_e_t_e_K_e_y_s &discreteParents, │ │ │ │ -131 const std::vector &conditionals); │ │ │ │ -132 │ │ │ │ -136 │ │ │ │ -138 bool _e_q_u_a_l_s(const _H_y_b_r_i_d_F_a_c_t_o_r &lf, double tol = 1e-9) const override; │ │ │ │ -139 │ │ │ │ -141 void _p_r_i_n_t( │ │ │ │ -142 const std::string &s = "GaussianMixture\n", │ │ │ │ -143 const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = DefaultKeyFormatter) const override; │ │ │ │ -144 │ │ │ │ -148 │ │ │ │ -150 _G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_:_:_s_h_a_r_e_d___p_t_r operator()( │ │ │ │ -151 const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &discreteValues) const; │ │ │ │ -152 │ │ │ │ -154 size_t nrComponents() const; │ │ │ │ -155 │ │ │ │ -157 _K_e_y_V_e_c_t_o_r continuousParents() const; │ │ │ │ -158 │ │ │ │ -_1_6_1 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 logConstant_; } │ │ │ │ -162 │ │ │ │ -167 boost::shared_ptr likelihood( │ │ │ │ -168 const _V_e_c_t_o_r_V_a_l_u_e_s &given) const; │ │ │ │ -169 │ │ │ │ -171 const Conditionals &conditionals() const; │ │ │ │ -172 │ │ │ │ -180 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> logProbability( │ │ │ │ -181 const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) const; │ │ │ │ -182 │ │ │ │ -208 double error(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const override; │ │ │ │ -209 │ │ │ │ -217 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> error(const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) │ │ │ │ +108 bool _e_q_u_a_l_s(const _H_y_b_r_i_d_F_a_c_t_o_r &lf, double tol = 1e-9) const override; │ │ │ │ +109 │ │ │ │ +110 void _p_r_i_n_t( │ │ │ │ +111 const std::string &s = "GaussianMixtureFactor\n", │ │ │ │ +112 const _K_e_y_F_o_r_m_a_t_t_e_r &formatter = DefaultKeyFormatter) const override; │ │ │ │ +113 │ │ │ │ +117 │ │ │ │ +119 sharedFactor operator()(const _D_i_s_c_r_e_t_e_V_a_l_u_e_s &assignment) const; │ │ │ │ +120 │ │ │ │ +129 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e add(const _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum) const; │ │ │ │ +130 │ │ │ │ +138 _A_l_g_e_b_r_a_i_c_D_e_c_i_s_i_o_n_T_r_e_e_<_K_e_y_> error(const _V_e_c_t_o_r_V_a_l_u_e_s &continuousValues) │ │ │ │ const; │ │ │ │ -218 │ │ │ │ -225 double logProbability(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const override; │ │ │ │ -226 │ │ │ │ -228 double evaluate(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const override; │ │ │ │ -229 │ │ │ │ -_2_3_1 double _o_p_e_r_a_t_o_r_(_)(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const { │ │ │ │ -232 return evaluate(values); │ │ │ │ -233 } │ │ │ │ -234 │ │ │ │ -242 void prune(const _D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r &decisionTree); │ │ │ │ -243 │ │ │ │ -251 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e add(const _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum) const; │ │ │ │ -253 │ │ │ │ -254 private: │ │ │ │ -256 bool allFrontalsGiven(const _V_e_c_t_o_r_V_a_l_u_e_s &given) const; │ │ │ │ -257 │ │ │ │ -_2_5_9 friend class boost::serialization::access; │ │ │ │ -260 template │ │ │ │ -261 void serialize(Archive &ar, const unsigned int /*version*/) { │ │ │ │ -262 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_F_a_c_t_o_r); │ │ │ │ -263 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e_C_o_n_d_i_t_i_o_n_a_l); │ │ │ │ -264 ar &BOOST_SERIALIZATION_NVP(conditionals_); │ │ │ │ -265 } │ │ │ │ -266}; │ │ │ │ -267 │ │ │ │ -269std::set _D_i_s_c_r_e_t_e_K_e_y_s_A_s_S_e_t(const DiscreteKeys &discreteKeys); │ │ │ │ -270 │ │ │ │ -271// traits │ │ │ │ -272template <> │ │ │ │ -_2_7_3struct _t_r_a_i_t_s<_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -274 │ │ │ │ -275} // namespace gtsam │ │ │ │ -_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ -specialized key for discrete variables │ │ │ │ -_D_e_c_i_s_i_o_n_T_r_e_e_F_a_c_t_o_r_._h │ │ │ │ +139 │ │ │ │ +144 double error(const _H_y_b_r_i_d_V_a_l_u_e_s &values) const override; │ │ │ │ +145 │ │ │ │ +_1_4_7 friend _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &_o_p_e_r_a_t_o_r_+_=( │ │ │ │ +148 _G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_T_r_e_e &sum, const _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r &factor) { │ │ │ │ +149 sum = factor._a_d_d(sum); │ │ │ │ +150 return sum; │ │ │ │ +151 } │ │ │ │ +153 │ │ │ │ +154 private: │ │ │ │ +_1_5_6 friend class boost::serialization::access; │ │ │ │ +157 template │ │ │ │ +158 void serialize(ARCHIVE &ar, const unsigned int /*version*/) { │ │ │ │ +159 ar &BOOST_SERIALIZATION_BASE_OBJECT_NVP(_B_a_s_e); │ │ │ │ +160 ar &BOOST_SERIALIZATION_NVP(factors_); │ │ │ │ +161 } │ │ │ │ +162}; │ │ │ │ +163 │ │ │ │ +164// traits │ │ │ │ +165template <> │ │ │ │ +_1_6_6struct _t_r_a_i_t_s<_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r> : public │ │ │ │ +_T_e_s_t_a_b_l_e { │ │ │ │ +167}; │ │ │ │ +168 │ │ │ │ +169} // namespace gtsam │ │ │ │ _D_e_c_i_s_i_o_n_T_r_e_e_._h │ │ │ │ Decision Tree for use in DiscreteFactors. │ │ │ │ +_D_i_s_c_r_e_t_e_K_e_y_._h │ │ │ │ +specialized key for discrete variables │ │ │ │ +_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. │ │ │ │ _H_y_b_r_i_d_F_a_c_t_o_r_._h │ │ │ │ -_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_._h │ │ │ │ -A set of GaussianFactors, indexed by a set of discrete keys. │ │ │ │ -_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -Base class for conditional densities. │ │ │ │ -_G_a_u_s_s_i_a_n_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ -Conditional Gaussian Base class. │ │ │ │ +_G_a_u_s_s_i_a_n_F_a_c_t_o_r_._h │ │ │ │ +A factor with a quadratic error function - a Gaussian. │ │ │ │ +_G_a_u_s_s_i_a_n_F_a_c_t_o_r_G_r_a_p_h_._h │ │ │ │ +Linear Factor Graph where all factors are Gaussians. │ │ │ │ _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_:_:_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_:_:_D_i_s_c_r_e_t_e_K_e_y_s_A_s_S_e_t │ │ │ │ -std::set< DiscreteKey > DiscreteKeysAsSet(const DiscreteKeys &discreteKeys) │ │ │ │ -Return the DiscreteKey vector as a set. │ │ │ │ -DDeeffiinniittiioonn GaussianMixture.cpp:221 │ │ │ │ _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_:_:_p_r_u_n_e_r_F_u_n_c │ │ │ │ -std::function< double(const Assignment< Key > &, double)> prunerFunc(const │ │ │ │ -DecisionTreeFactor &prunedDecisionTree, const HybridConditional &conditional) │ │ │ │ -Helper function to get the pruner functional. │ │ │ │ -DDeeffiinniittiioonn HybridBayesNet.cpp:66 │ │ │ │ _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_:_:_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_<_ _K_e_y_,_ _G_a_u_s_s_i_a_n_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_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_<_ _K_e_y_,_ _s_h_a_r_e_d_F_a_c_t_o_r_ _> │ │ │ │ _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_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ -A conditional of gaussian mixtures indexed by discrete variables, as part of a │ │ │ │ -Bayes Network. │ │ │ │ -DDeeffiinniittiioonn GaussianMixture.h:55 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_:_:_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 │ │ │ │ -The log normalization constant is max of the the individual log-normalization │ │ │ │ -constants. │ │ │ │ -DDeeffiinniittiioonn GaussianMixture.h:161 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ -double operator()(const HybridValues &values) const │ │ │ │ -Evaluate probability density, sugar. │ │ │ │ -DDeeffiinniittiioonn GaussianMixture.h:231 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e │ │ │ │ -GaussianMixture()=default │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ +Implementation of a discrete conditional mixture factor. │ │ │ │ +DDeeffiinniittiioonn GaussianMixtureFactor.h:47 │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ +GaussianMixtureFactor()=default │ │ │ │ Default constructor, mainly for serialization. │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r │ │ │ │ +GaussianMixtureFactor(const KeyVector &continuousKeys, const DiscreteKeys │ │ │ │ +&discreteKeys, const std::vector< sharedFactor > &factors) │ │ │ │ +Construct a new GaussianMixtureFactor object using a vector of GaussianFactor │ │ │ │ +shared pointers. │ │ │ │ +DDeeffiinniittiioonn GaussianMixtureFactor.h:98 │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_a_d_d │ │ │ │ +GaussianFactorGraphTree add(const GaussianFactorGraphTree &sum) const │ │ │ │ +Combine the Gaussian Factor Graphs in sum and this while maintaining the │ │ │ │ +original tree structure. │ │ │ │ +DDeeffiinniittiioonn GaussianMixtureFactor.cpp:85 │ │ │ │ +_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_F_a_c_t_o_r_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ +friend GaussianFactorGraphTree & operator+=(GaussianFactorGraphTree &sum, const │ │ │ │ +GaussianMixtureFactor &factor) │ │ │ │ +Add MixtureFactor to a Sum, syntactic sugar. │ │ │ │ +DDeeffiinniittiioonn GaussianMixtureFactor.h:147 │ │ │ │ _g_t_s_a_m_:_:_H_y_b_r_i_d_F_a_c_t_o_r │ │ │ │ Base class for truly hybrid probabilistic factors. │ │ │ │ DDeeffiinniittiioonn HybridFactor.h:52 │ │ │ │ _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 │ │ │ │ -_g_t_s_a_m_:_:_G_a_u_s_s_i_a_n_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 GaussianConditional.h:46 │ │ │ │ _g_t_s_a_m_:_:_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ VectorValues represents a collection of vector-valued variables associated each │ │ │ │ with a unique integer... │ │ │ │ DDeeffiinniittiioonn VectorValues.h:74 │ │ │ │ +_D_i_s_c_r_e_t_e_V_a_l_u_e_s │ │ │ │ +The Factor::error simply extracts the. │ │ │ │ _H_y_b_r_i_d_V_a_l_u_e_s │ │ │ │ the error. │ │ │ │ +_V_e_c_t_o_r_V_a_l_u_e_s │ │ │ │ +The Factor::error simply extracts the. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _h_y_b_r_i_d │ │ │ │ - * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_e_._h │ │ │ │ + * _G_a_u_s_s_i_a_n_M_i_x_t_u_r_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/a00572.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Ordering.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/DotWriter.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,33 +95,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
Ordering.cpp File Reference
│ │ │ +
DotWriter.cpp File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

Graphviz formatting for factor graphs. │ │ │ +More...

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Author
Richard Roberts
│ │ │ -
│ │ │ -Andrew Melim
│ │ │ -
Date
Sep 2, 2010
│ │ │ +

Graphviz formatting for factor graphs.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
December, 2021
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -Ordering.cpp File Reference │ │ │ │ +DotWriter.cpp File Reference │ │ │ │ +Graphviz formatting for factor graphs. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Graphviz formatting for factor graphs. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Andrew Melim │ │ │ │ + Frank Dellaert │ │ │ │ Date │ │ │ │ - Sep 2, 2010 │ │ │ │ + December, 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _O_r_d_e_r_i_n_g_._c_p_p │ │ │ │ + * _D_o_t_W_r_i_t_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/a00575.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/inferenceExceptions.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Factor.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,44 +95,56 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
inferenceExceptions.h File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs
│ │ │ +
Factor.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Exceptions that may be thrown by inference algorithms. │ │ │ +

The base class for all factors. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  gtsam::InconsistentEliminationRequested
 An inference algorithm was called with inconsistent arguments. More...
class  gtsam::Factor
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Typedefs

typedef FastVector< FactorIndexgtsam::FactorIndices
 Define collection types:
 
│ │ │ +typedef FastSet< FactorIndexgtsam::FactorIndexSet
 
│ │ │

Detailed Description

│ │ │ -

Exceptions that may be thrown by inference algorithms.

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
Apr 25, 2013
│ │ │ +

The base class for all factors.

│ │ │ +
Author
Kai Ni
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +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 │ │ │ │ -inferenceExceptions.h File Reference │ │ │ │ -Exceptions that may be thrown by inference algorithms. _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 │ │ │ │ +Factor.h File Reference │ │ │ │ +The base class for all factors. _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_c_o_n_s_i_s_t_e_n_t_E_l_i_m_i_n_a_t_i_o_n_R_e_q_u_e_s_t_e_d │ │ │ │ -  An inference algorithm was called with inconsistent arguments. _M_o_r_e_._._. │ │ │ │ +class   _g_t_s_a_m_:_:_F_a_c_t_o_r │ │ │ │   │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +typedef _F_a_s_t_V_e_c_t_o_r< _F_a_c_t_o_r_I_n_d_e_x >  _g_t_s_a_m_:_:_F_a_c_t_o_r_I_n_d_i_c_e_s │ │ │ │ +  Define collection types: │ │ │ │ +  │ │ │ │ + typedef _F_a_s_t_S_e_t< _F_a_c_t_o_r_I_n_d_e_x >  ggttssaamm::::FFaaccttoorrIInnddeexxSSeett │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Exceptions that may be thrown by inference algorithms. │ │ │ │ +The base class for all factors. │ │ │ │ Author │ │ │ │ + Kai Ni │ │ │ │ + Frank Dellaert │ │ │ │ Richard Roberts │ │ │ │ - Date │ │ │ │ - Apr 25, 2013 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _i_n_f_e_r_e_n_c_e_E_x_c_e_p_t_i_o_n_s_._h │ │ │ │ + * _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/a00575.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,4 @@ │ │ │ │ var a00575 = [ │ │ │ │ - ["gtsam::InconsistentEliminationRequested", "a03636.html", null] │ │ │ │ + ["gtsam::Factor", "a03592.html", "a03592"], │ │ │ │ + ["FactorIndices", "a00575.html#a99e63c90a8ac740d99716e73fe97e054", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00575_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/inferenceExceptions.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Factor.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,59 +98,183 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
inferenceExceptions.h
│ │ │ +
Factor.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#include <boost/lexical_cast.hpp>
│ │ │ -
22#include <exception>
│ │ │ +
20// \callgraph
│ │ │ +
21
│ │ │ +
22#pragma once
│ │ │
23
│ │ │ -
24namespace gtsam {
│ │ │ -
25
│ │ │ -
│ │ │ -
29 class InconsistentEliminationRequested : public std::exception {
│ │ │ -
30 public:
│ │ │ - │ │ │ -
32 ~InconsistentEliminationRequested() noexcept override {}
│ │ │ -
33 const char* what() const noexcept override {
│ │ │ -
34 return
│ │ │ -
35 "An inference algorithm was called with inconsistent arguments. The\n"
│ │ │ -
36 "factor graph, ordering, or variable index were inconsistent with each\n"
│ │ │ -
37 "other, or a full elimination routine was called with an ordering that\n"
│ │ │ -
38 "does not include all of the variables.";
│ │ │ -
39 }
│ │ │ -
40 };
│ │ │ -
│ │ │ -
41
│ │ │ -
42}
│ │ │ -
Included from all GTSAM files.
│ │ │ +
24#include <boost/serialization/nvp.hpp>
│ │ │ +
25#include <boost/shared_ptr.hpp>
│ │ │ +
26
│ │ │ +
27#include <gtsam/base/types.h>
│ │ │ + │ │ │ +
29#include <gtsam/inference/Key.h>
│ │ │ +
30
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ + │ │ │ +
35 typedef FastSet<FactorIndex> FactorIndexSet;
│ │ │ +
36
│ │ │ +
37 class HybridValues; // forward declaration of a Value type for error.
│ │ │ +
38
│ │ │ +
│ │ │ +
67 class GTSAM_EXPORT Factor
│ │ │ +
68 {
│ │ │ +
69
│ │ │ +
70 private:
│ │ │ +
71 // These typedefs are private because they must be overridden in derived classes.
│ │ │ +
72 typedef Factor This;
│ │ │ +
73 typedef boost::shared_ptr<Factor> shared_ptr;
│ │ │ +
74
│ │ │ +
75 public:
│ │ │ +
77 typedef KeyVector::iterator iterator;
│ │ │ +
78
│ │ │ +
80 typedef KeyVector::const_iterator const_iterator;
│ │ │ +
81
│ │ │ +
82 protected:
│ │ │ +
83
│ │ │ + │ │ │ +
86
│ │ │ +
89
│ │ │ +
91 Factor() {}
│ │ │ +
92
│ │ │ +
95 template<typename CONTAINER>
│ │ │ +
96 explicit Factor(const CONTAINER& keys) : keys_(keys.begin(), keys.end()) {}
│ │ │ +
97
│ │ │ +
100 template<typename ITERATOR>
│ │ │ +
101 Factor(ITERATOR first, ITERATOR last) : keys_(first, last) {}
│ │ │ +
102
│ │ │ +
105 template<typename CONTAINER>
│ │ │ +
│ │ │ +
106 static Factor FromKeys(const CONTAINER& keys) {
│ │ │ +
107 return Factor(keys.begin(), keys.end()); }
│ │ │ +
│ │ │ +
108
│ │ │ +
111 template<typename ITERATOR>
│ │ │ +
│ │ │ +
112 static Factor FromIterators(ITERATOR first, ITERATOR last) {
│ │ │ +
113 return Factor(first, last); }
│ │ │ +
│ │ │ +
114
│ │ │ +
116
│ │ │ +
117 public:
│ │ │ +
119 // public since it is required for boost serialization and static methods.
│ │ │ +
120 // virtual since it is public.
│ │ │ +
121 // http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor-virtual
│ │ │ +
122 virtual ~Factor() = default;
│ │ │ +
123
│ │ │ +
126
│ │ │ +
128 bool empty() const { return keys_.empty(); }
│ │ │ +
129
│ │ │ +
131 Key front() const { return keys_.front(); }
│ │ │ +
132
│ │ │ +
134 Key back() const { return keys_.back(); }
│ │ │ +
135
│ │ │ +
137 const_iterator find(Key key) const { return std::find(begin(), end(), key); }
│ │ │ +
138
│ │ │ +
140 const KeyVector& keys() const { return keys_; }
│ │ │ +
141
│ │ │ +
143 const_iterator begin() const { return keys_.begin(); }
│ │ │ +
144
│ │ │ +
146 const_iterator end() const { return keys_.end(); }
│ │ │ +
147
│ │ │ +
152 virtual double error(const HybridValues& c) const;
│ │ │ +
153
│ │ │ +
157 size_t size() const { return keys_.size(); }
│ │ │ +
158
│ │ │ +
160
│ │ │ +
163
│ │ │ +
165 virtual void print(
│ │ │ +
166 const std::string& s = "Factor",
│ │ │ +
167 const KeyFormatter& formatter = DefaultKeyFormatter) const;
│ │ │ +
168
│ │ │ +
170 virtual void printKeys(
│ │ │ +
171 const std::string& s = "Factor",
│ │ │ +
172 const KeyFormatter& formatter = DefaultKeyFormatter) const;
│ │ │ +
173
│ │ │ +
175 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ +
176
│ │ │ +
180
│ │ │ +
182 KeyVector& keys() { return keys_; }
│ │ │ +
183
│ │ │ +
185 iterator begin() { return keys_.begin(); }
│ │ │ +
186
│ │ │ +
188 iterator end() { return keys_.end(); }
│ │ │ +
189
│ │ │ +
191
│ │ │ +
192 private:
│ │ │ +
193
│ │ │ +
196
│ │ │ +
198 friend class boost::serialization::access;
│ │ │ +
199 template<class Archive>
│ │ │ +
200 void serialize(Archive & ar, const unsigned int /*version*/) {
│ │ │ +
201 ar & BOOST_SERIALIZATION_NVP(keys_);
│ │ │ +
202 }
│ │ │ +
203
│ │ │ +
205
│ │ │ +
206 };
│ │ │ +
│ │ │ +
207
│ │ │ +
208} // \namespace gtsam
│ │ │ +
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
│ │ │ -
An inference algorithm was called with inconsistent arguments.
Definition inferenceExceptions.h:29
│ │ │ +
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
│ │ │ +
FastVector< FactorIndex > FactorIndices
Define collection types:
Definition Factor.h:34
│ │ │ +
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
│ │ │ +
FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the defa...
Definition FastSet.h:50
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
Definition Factor.h:68
│ │ │ +
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition Factor.h:140
│ │ │ +
KeyVector keys_
The keys involved in this factor.
Definition Factor.h:85
│ │ │ +
const_iterator find(Key key) const
find
Definition Factor.h:137
│ │ │ +
const_iterator begin() const
Iterator at beginning of involved variable keys.
Definition Factor.h:143
│ │ │ +
Factor()
Default constructor for I/O.
Definition Factor.h:91
│ │ │ +
iterator end()
Iterator at end of involved variable keys.
Definition Factor.h:188
│ │ │ +
bool empty() const
Whether the factor is empty (involves zero variables).
Definition Factor.h:128
│ │ │ +
KeyVector & keys()
Definition Factor.h:182
│ │ │ +
static Factor FromIterators(ITERATOR first, ITERATOR last)
Construct factor from iterator keys.
Definition Factor.h:112
│ │ │ +
static Factor FromKeys(const CONTAINER &keys)
Construct factor from container of keys.
Definition Factor.h:106
│ │ │ +
iterator begin()
Iterator at beginning of involved variable keys.
Definition Factor.h:185
│ │ │ +
virtual ~Factor()=default
Default destructor.
│ │ │ +
Factor(ITERATOR first, ITERATOR last)
Construct factor from iterator keys.
Definition Factor.h:101
│ │ │ +
KeyVector::const_iterator const_iterator
Const iterator over keys.
Definition Factor.h:80
│ │ │ +
const_iterator end() const
Iterator at end of involved variable keys.
Definition Factor.h:146
│ │ │ +
Factor(const CONTAINER &keys)
Construct factor from container of keys.
Definition Factor.h:96
│ │ │ +
KeyVector::iterator iterator
Iterator over keys.
Definition Factor.h:77
│ │ │ +
Key back() const
Last key.
Definition Factor.h:134
│ │ │ +
Key front() const
First key.
Definition Factor.h:131
│ │ │ +
size_t size() const
Definition Factor.h:157
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,54 +1,260 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -inferenceExceptions.h │ │ │ │ +Factor.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#include │ │ │ │ -22#include │ │ │ │ +20// \callgraph │ │ │ │ +21 │ │ │ │ +22#pragma once │ │ │ │ 23 │ │ │ │ -24namespace _g_t_s_a_m { │ │ │ │ -25 │ │ │ │ -_2_9 class _I_n_c_o_n_s_i_s_t_e_n_t_E_l_i_m_i_n_a_t_i_o_n_R_e_q_u_e_s_t_e_d : public std::exception { │ │ │ │ -30 public: │ │ │ │ -31 _I_n_c_o_n_s_i_s_t_e_n_t_E_l_i_m_i_n_a_t_i_o_n_R_e_q_u_e_s_t_e_d() noexcept {} │ │ │ │ -32 _~_I_n_c_o_n_s_i_s_t_e_n_t_E_l_i_m_i_n_a_t_i_o_n_R_e_q_u_e_s_t_e_d() noexcept override {} │ │ │ │ -33 const char* what() const noexcept override { │ │ │ │ -34 return │ │ │ │ -35 "An inference algorithm was called with inconsistent arguments. The\n" │ │ │ │ -36 "factor graph, ordering, or variable index were inconsistent with each\n" │ │ │ │ -37 "other, or a full elimination routine was called with an ordering that\n" │ │ │ │ -38 "does not include all of the variables."; │ │ │ │ -39 } │ │ │ │ -40 }; │ │ │ │ -41 │ │ │ │ -42} │ │ │ │ -_g_l_o_b_a_l___i_n_c_l_u_d_e_s_._h │ │ │ │ -Included from all GTSAM files. │ │ │ │ +24#include │ │ │ │ +25#include │ │ │ │ +26 │ │ │ │ +27#include <_g_t_s_a_m_/_b_a_s_e_/_t_y_p_e_s_._h> │ │ │ │ +28#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +29#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +_3_4 typedef _F_a_s_t_V_e_c_t_o_r_<_F_a_c_t_o_r_I_n_d_e_x_> _F_a_c_t_o_r_I_n_d_i_c_e_s; │ │ │ │ +35 typedef _F_a_s_t_S_e_t_<_F_a_c_t_o_r_I_n_d_e_x_> FactorIndexSet; │ │ │ │ +36 │ │ │ │ +37 class _H_y_b_r_i_d_V_a_l_u_e_s; // forward declaration of a Value type for error. │ │ │ │ +38 │ │ │ │ +_6_7 class GTSAM_EXPORT _F_a_c_t_o_r │ │ │ │ +68 { │ │ │ │ +69 │ │ │ │ +70 private: │ │ │ │ +71 // These typedefs are private because they must be overridden in derived │ │ │ │ +classes. │ │ │ │ +72 typedef _F_a_c_t_o_r _T_h_i_s; │ │ │ │ +73 typedef boost::shared_ptr shared_ptr; │ │ │ │ +74 │ │ │ │ +75 public: │ │ │ │ +_7_7 typedef KeyVector::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +78 │ │ │ │ +_8_0 typedef KeyVector::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +81 │ │ │ │ +82 protected: │ │ │ │ +83 │ │ │ │ +_8_5 _K_e_y_V_e_c_t_o_r _k_e_y_s__; │ │ │ │ +86 │ │ │ │ +89 │ │ │ │ +_9_1 _F_a_c_t_o_r() {} │ │ │ │ +92 │ │ │ │ +95 template │ │ │ │ +_9_6 explicit _F_a_c_t_o_r(const CONTAINER& keys) : keys_(keys.begin(), keys.end()) {} │ │ │ │ +97 │ │ │ │ +100 template │ │ │ │ +_1_0_1 _F_a_c_t_o_r(ITERATOR first, ITERATOR last) : keys_(first, last) {} │ │ │ │ +102 │ │ │ │ +105 template │ │ │ │ +_1_0_6 static _F_a_c_t_o_r _F_r_o_m_K_e_y_s(const CONTAINER& keys) { │ │ │ │ +107 return _F_a_c_t_o_r(keys.begin(), keys.end()); } │ │ │ │ +108 │ │ │ │ +111 template │ │ │ │ +_1_1_2 static _F_a_c_t_o_r _F_r_o_m_I_t_e_r_a_t_o_r_s(ITERATOR first, ITERATOR last) { │ │ │ │ +113 return _F_a_c_t_o_r(first, last); } │ │ │ │ +114 │ │ │ │ +116 │ │ │ │ +117 public: │ │ │ │ +119 // public since it is required for boost serialization and static methods. │ │ │ │ +120 // virtual since it is public. │ │ │ │ +121 // http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-dtor- │ │ │ │ +virtual │ │ │ │ +_1_2_2 virtual _~_F_a_c_t_o_r() = default; │ │ │ │ +123 │ │ │ │ +126 │ │ │ │ +_1_2_8 bool _e_m_p_t_y() const { return keys_.empty(); } │ │ │ │ +129 │ │ │ │ +_1_3_1 _K_e_y _f_r_o_n_t() const { return keys_.front(); } │ │ │ │ +132 │ │ │ │ +_1_3_4 _K_e_y _b_a_c_k() const { return keys_.back(); } │ │ │ │ +135 │ │ │ │ +_1_3_7 _c_o_n_s_t___i_t_e_r_a_t_o_r _f_i_n_d(_K_e_y key) const { return std::find(begin(), end(), key); │ │ │ │ +} │ │ │ │ +138 │ │ │ │ +_1_4_0 const _K_e_y_V_e_c_t_o_r& _k_e_y_s() const { return keys_; } │ │ │ │ +141 │ │ │ │ +_1_4_3 _c_o_n_s_t___i_t_e_r_a_t_o_r _b_e_g_i_n() const { return keys_.begin(); } │ │ │ │ +144 │ │ │ │ +_1_4_6 _c_o_n_s_t___i_t_e_r_a_t_o_r _e_n_d() const { return keys_.end(); } │ │ │ │ +147 │ │ │ │ +152 virtual double error(const _H_y_b_r_i_d_V_a_l_u_e_s& c) const; │ │ │ │ +153 │ │ │ │ +_1_5_7 size_t _s_i_z_e() const { return keys_.size(); } │ │ │ │ +158 │ │ │ │ +160 │ │ │ │ +163 │ │ │ │ +165 virtual void _p_r_i_n_t( │ │ │ │ +166 const std::string& s = "Factor", │ │ │ │ +167 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const; │ │ │ │ +168 │ │ │ │ +170 virtual void printKeys( │ │ │ │ +171 const std::string& s = "Factor", │ │ │ │ +172 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const; │ │ │ │ +173 │ │ │ │ +175 bool _e_q_u_a_l_s(const This& other, double tol = 1e-9) const; │ │ │ │ +176 │ │ │ │ +180 │ │ │ │ +_1_8_2 _K_e_y_V_e_c_t_o_r& _k_e_y_s() { return keys_; } │ │ │ │ +183 │ │ │ │ +_1_8_5 _i_t_e_r_a_t_o_r _b_e_g_i_n() { return keys_.begin(); } │ │ │ │ +186 │ │ │ │ +_1_8_8 _i_t_e_r_a_t_o_r _e_n_d() { return keys_.end(); } │ │ │ │ +189 │ │ │ │ +191 │ │ │ │ +192 private: │ │ │ │ +193 │ │ │ │ +196 │ │ │ │ +_1_9_8 friend class boost::serialization::access; │ │ │ │ +199 template │ │ │ │ +200 void serialize(Archive & ar, const unsigned int /*version*/) { │ │ │ │ +201 ar & BOOST_SERIALIZATION_NVP(keys_); │ │ │ │ +202 } │ │ │ │ +203 │ │ │ │ +205 │ │ │ │ +206 }; │ │ │ │ +207 │ │ │ │ +208} // \namespace gtsam │ │ │ │ +_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. │ │ │ │ +_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_:_:_I_n_c_o_n_s_i_s_t_e_n_t_E_l_i_m_i_n_a_t_i_o_n_R_e_q_u_e_s_t_e_d │ │ │ │ -An inference algorithm was called with inconsistent arguments. │ │ │ │ -DDeeffiinniittiioonn inferenceExceptions.h:29 │ │ │ │ +_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_:_:_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_:_:_F_a_c_t_o_r_I_n_d_i_c_e_s │ │ │ │ +FastVector< FactorIndex > FactorIndices │ │ │ │ +Define collection types: │ │ │ │ +DDeeffiinniittiioonn Factor.h:34 │ │ │ │ +_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_:_:_F_a_s_t_S_e_t │ │ │ │ +FastSet is a thin wrapper around std::set that uses the boost │ │ │ │ +fast_pool_allocator instead of the defa... │ │ │ │ +DDeeffiinniittiioonn FastSet.h:50 │ │ │ │ +_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_:_:_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_:_:_F_a_c_t_o_r │ │ │ │ +DDeeffiinniittiioonn Factor.h:68 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_k_e_y_s │ │ │ │ +const KeyVector & keys() const │ │ │ │ +Access the factor's involved variable keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:140 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_k_e_y_s__ │ │ │ │ +KeyVector keys_ │ │ │ │ +The keys involved in this factor. │ │ │ │ +DDeeffiinniittiioonn Factor.h:85 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_f_i_n_d │ │ │ │ +const_iterator find(Key key) const │ │ │ │ +find │ │ │ │ +DDeeffiinniittiioonn Factor.h:137 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const │ │ │ │ +Iterator at beginning of involved variable keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:143 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_F_a_c_t_o_r │ │ │ │ +Factor() │ │ │ │ +Default constructor for I/O. │ │ │ │ +DDeeffiinniittiioonn Factor.h:91 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_e_n_d │ │ │ │ +iterator end() │ │ │ │ +Iterator at end of involved variable keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:188 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +Whether the factor is empty (involves zero variables). │ │ │ │ +DDeeffiinniittiioonn Factor.h:128 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_k_e_y_s │ │ │ │ +KeyVector & keys() │ │ │ │ +DDeeffiinniittiioonn Factor.h:182 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_F_r_o_m_I_t_e_r_a_t_o_r_s │ │ │ │ +static Factor FromIterators(ITERATOR first, ITERATOR last) │ │ │ │ +Construct factor from iterator keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:112 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_F_r_o_m_K_e_y_s │ │ │ │ +static Factor FromKeys(const CONTAINER &keys) │ │ │ │ +Construct factor from container of keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:106 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ +iterator begin() │ │ │ │ +Iterator at beginning of involved variable keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:185 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_~_F_a_c_t_o_r │ │ │ │ +virtual ~Factor()=default │ │ │ │ +Default destructor. │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_F_a_c_t_o_r │ │ │ │ +Factor(ITERATOR first, ITERATOR last) │ │ │ │ +Construct factor from iterator keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:101 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +KeyVector::const_iterator const_iterator │ │ │ │ +Const iterator over keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:80 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_e_n_d │ │ │ │ +const_iterator end() const │ │ │ │ +Iterator at end of involved variable keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:146 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_F_a_c_t_o_r │ │ │ │ +Factor(const CONTAINER &keys) │ │ │ │ +Construct factor from container of keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:96 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_i_t_e_r_a_t_o_r │ │ │ │ +KeyVector::iterator iterator │ │ │ │ +Iterator over keys. │ │ │ │ +DDeeffiinniittiioonn Factor.h:77 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_b_a_c_k │ │ │ │ +Key back() const │ │ │ │ +Last key. │ │ │ │ +DDeeffiinniittiioonn Factor.h:134 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_f_r_o_n_t │ │ │ │ +Key front() const │ │ │ │ +First key. │ │ │ │ +DDeeffiinniittiioonn Factor.h:131 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_:_:_s_i_z_e │ │ │ │ +size_t size() const │ │ │ │ +DDeeffiinniittiioonn Factor.h:157 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _i_n_f_e_r_e_n_c_e_E_x_c_e_p_t_i_o_n_s_._h │ │ │ │ + * _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/a00578.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/inference-inst.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/BayesTree.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,87 +94,53 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
inference-inst.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
BayesTree.h File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Contains generic inference algorithms that convert between templated graphical models, i.e., factor graphs, Bayes nets, and Bayes trees. │ │ │ +

Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ More...

│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

struct  gtsam::BayesTreeCliqueStats
 clique statistics More...
 
struct  gtsam::BayesTreeCliqueData
 store all the sizes
│ │ │ + More...
 
class  gtsam::BayesTree< CLIQUE >
 Bayes tree. More...
 
class  gtsam::BayesTreeOrphanWrapper< CLIQUE, typename >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

template<class TREE , class RESULT >
FastVector< typename TREE::sharedFactor > gtsam::inference::EliminateTree (RESULT &result, const TREE &tree, const typename TREE::Eliminate &function)
 Eliminate an elimination tree or a Bayes tree (used internally).
 
│ │ │

Detailed Description

│ │ │ -

Contains generic inference algorithms that convert between templated graphical models, i.e., factor graphs, Bayes nets, and Bayes trees.

│ │ │ -
Author
Frank Dellaert
│ │ │ -
│ │ │ -Richard Roberts
│ │ │ -

Function Documentation

│ │ │ - │ │ │ -

◆ EliminateTree()

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -template<class TREE , class RESULT >
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
FastVector< typename TREE::sharedFactor > gtsam::inference::EliminateTree (RESULT & result,
const TREE & tree,
const typename TREE::Eliminate & function 
)
│ │ │ -
│ │ │ - │ │ │ -

Eliminate an elimination tree or a Bayes tree (used internally).

│ │ │ -

Requires TREE::BayesNetType, TREE::FactorGraphType, TREE::sharedConditional, TREE::sharedFactor, TREE::Node, TREE::sharedNode, TREE::Node::factors, TREE::Node::children.

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

Bayes Tree is a tree of cliques of a Bayes Chain.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,45 +1,34 @@ │ │ │ │ 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 │ │ │ │ -inference-inst.h File Reference │ │ │ │ -Contains ggeenneerriicc inference algorithms that convert between templated graphical │ │ │ │ -models, i.e., factor graphs, Bayes nets, and Bayes trees. _M_o_r_e_._._. │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +BayesTree.h File Reference │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. _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_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_S_t_a_t_s │ │ │ │ +  clique statistics _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ +struct   _g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a │ │ │ │ +  store all the sizes │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_<_ _C_L_I_Q_U_E_ _> │ │ │ │ +  Bayes tree. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ + class   _g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_<_ _C_L_I_Q_U_E_,_ _t_y_p_e_n_a_m_e_ _> │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -_F_a_s_t_V_e_c_t_o_r< typename TREE::sharedFactor _g_t_s_a_m_:_:_i_n_f_e_r_e_n_c_e_:_:_E_l_i_m_i_n_a_t_e_T_r_e_e (RESULT │ │ │ │ - >  &result, const TREE &tree, const │ │ │ │ - typename TREE::Eliminate &function) │ │ │ │ -  Eliminate an elimination tree or a │ │ │ │ - Bayes tree (used internally). │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Contains ggeenneerriicc inference algorithms that convert between templated graphical │ │ │ │ -models, i.e., factor graphs, Bayes nets, and Bayes trees. │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ Author │ │ │ │ Frank Dellaert │ │ │ │ - Richard Roberts │ │ │ │ -********** FFuunnccttiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? EElliimmiinnaatteeTTrreeee(()) ********** │ │ │ │ -template │ │ │ │ -FastVector< typename TREE:: │ │ │ │ -sharedFactor > gtsam::inference:: ( RESULT &  rreessuulltt, │ │ │ │ -EliminateTree │ │ │ │ - const TREE &  ttrreeee, │ │ │ │ - const typename TREE::Eliminate &  ffuunnccttiioonn  │ │ │ │ - ) │ │ │ │ -Eliminate an elimination tree or a Bayes tree (used internally). │ │ │ │ -Requires TREE::BayesNetType, TREE::FactorGraphType, TREE::sharedConditional, │ │ │ │ -TREE::sharedFactor, TREE::Node, TREE::sharedNode, TREE::Node::factors, TREE:: │ │ │ │ -Node::children. │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _i_n_f_e_r_e_n_c_e_-_i_n_s_t_._h │ │ │ │ + * _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/a00578.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,3 +1,5 @@ │ │ │ │ var a00578 = [ │ │ │ │ - ["EliminateTree", "a00578.html#ae955942fde34b4cf32ac3573a1aa1e29", null] │ │ │ │ + ["gtsam::BayesTreeCliqueStats", "a03532.html", null], │ │ │ │ + ["gtsam::BayesTreeCliqueData", "a03536.html", null], │ │ │ │ + ["gtsam::BayesTreeOrphanWrapper< CLIQUE, typename >", "a03544.html", "a03544"] │ │ │ │ ]; │ │ ├── ./usr/share/doc/libgtsam-dev/html/a00578_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/inference-inst.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/BayesTree.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,109 +98,295 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
inference-inst.h
│ │ │ +
BayesTree.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// \callgraph
│ │ │ +
19
│ │ │
20#pragma once
│ │ │
21
│ │ │
22#include <boost/shared_ptr.hpp>
│ │ │ -
23#include <utility>
│ │ │ -
24
│ │ │ - │ │ │ - │ │ │ -
27
│ │ │ -
28namespace gtsam {
│ │ │ -
29 namespace inference {
│ │ │ +
23
│ │ │ +
24#include <gtsam/inference/Key.h>
│ │ │ +
25#include <gtsam/base/FastList.h>
│ │ │ +
26#include <gtsam/base/ConcurrentMap.h>
│ │ │ + │ │ │ +
28
│ │ │ +
29#include <string>
│ │ │
30
│ │ │ -
31 namespace {
│ │ │ -
32 /* ************************************************************************* */
│ │ │ -
33 template<class TREE>
│ │ │ -
34 struct EliminationData {
│ │ │ -
35 EliminationData* const parentData;
│ │ │ -
36 FastVector<typename TREE::sharedFactor> childFactors;
│ │ │ -
37 EliminationData(EliminationData* _parentData, size_t nChildren) :
│ │ │ -
38 parentData(_parentData) { childFactors.reserve(nChildren); }
│ │ │ -
39 };
│ │ │ -
40
│ │ │ -
41 /* ************************************************************************* */
│ │ │ -
42 template<class TREE>
│ │ │ -
43 EliminationData<TREE> eliminationPreOrderVisitor(
│ │ │ -
44 const typename TREE::sharedNode& node, EliminationData<TREE>& parentData)
│ │ │ -
45 {
│ │ │ -
46 // This function is called before visiting the children. Here, we create this node's data,
│ │ │ -
47 // which includes a pointer to the parent data and space for the factors of the children.
│ │ │ -
48 return EliminationData<TREE>(&parentData, node->children.size());
│ │ │ -
49 }
│ │ │ -
50
│ │ │ -
51 /* ************************************************************************* */
│ │ │ -
52 template<class TREE, class RESULT>
│ │ │ -
53 struct EliminationPostOrderVisitor
│ │ │ -
54 {
│ │ │ -
55 RESULT& result;
│ │ │ -
56 const typename TREE::Eliminate& eliminationFunction;
│ │ │ -
57 EliminationPostOrderVisitor(RESULT& result, const typename TREE::Eliminate& eliminationFunction) :
│ │ │ -
58 result(result), eliminationFunction(eliminationFunction) {}
│ │ │ -
59 void operator()(const typename TREE::sharedNode& node, EliminationData<TREE>& myData)
│ │ │ -
60 {
│ │ │ -
61 // Call eliminate on the node and add the result to the parent's gathered factors
│ │ │ -
62 typename TREE::sharedFactor childFactor = node->eliminate(result, eliminationFunction, myData.childFactors);
│ │ │ -
63 if(childFactor && !childFactor->empty())
│ │ │ -
64 myData.parentData->childFactors.push_back(childFactor);
│ │ │ -
65 }
│ │ │ -
66 };
│ │ │ -
67 }
│ │ │ -
68
│ │ │ -
69 /* ************************************************************************* */
│ │ │ -
73 template<class TREE, class RESULT>
│ │ │ -
74 FastVector<typename TREE::sharedFactor>
│ │ │ -
│ │ │ -
75 EliminateTree(RESULT& result, const TREE& tree, const typename TREE::Eliminate& function)
│ │ │ -
76 {
│ │ │ -
77 // Do elimination using a depth-first traversal. During the pre-order visit (see
│ │ │ -
78 // eliminationPreOrderVisitor), we store a pointer to the parent data (where we'll put the
│ │ │ -
79 // remaining factor) and reserve a vector of factors to store the children elimination
│ │ │ -
80 // results. During the post-order visit (see eliminationPostOrderVisitor), we call dense
│ │ │ -
81 // elimination (using the gathered child factors) and store the result in the parent's
│ │ │ -
82 // gathered factors.
│ │ │ -
83 EliminationData<TREE> rootData(0, tree.roots().size());
│ │ │ -
84 EliminationPostOrderVisitor<TREE,RESULT> visitorPost(result, function);
│ │ │ -
85 treeTraversal::DepthFirstForest(tree, rootData, eliminationPreOrderVisitor<TREE>, visitorPost);
│ │ │ -
86
│ │ │ -
87 // Return remaining factors
│ │ │ -
88 return rootData.childFactors;
│ │ │ -
89 }
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ +
33 // Forward declarations
│ │ │ +
34 template<class FACTOR> class FactorGraph;
│ │ │ +
35 template<class BAYESTREE, class GRAPH> class EliminatableClusterTree;
│ │ │ +
36
│ │ │ +
37 /* ************************************************************************* */
│ │ │ +
│ │ │ +
39 struct GTSAM_EXPORT BayesTreeCliqueStats {
│ │ │ +
40 double avgConditionalSize;
│ │ │ +
41 std::size_t maxConditionalSize;
│ │ │ +
42 double avgSeparatorSize;
│ │ │ +
43 std::size_t maxSeparatorSize;
│ │ │ +
44 void print(const std::string& s = "") const ;
│ │ │ +
45 };
│ │ │
│ │ │ +
46
│ │ │ +
│ │ │ +
48 struct GTSAM_EXPORT BayesTreeCliqueData {
│ │ │ +
49 FastVector<std::size_t> conditionalSizes;
│ │ │ +
50 FastVector<std::size_t> separatorSizes;
│ │ │ +
51 BayesTreeCliqueStats getStats() const;
│ │ │ +
52 };
│ │ │ +
│ │ │ +
53
│ │ │ +
54 /* ************************************************************************* */
│ │ │ +
65 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
67 {
│ │ │ +
68 protected:
│ │ │ +
69 typedef BayesTree<CLIQUE> This;
│ │ │ +
70 typedef boost::shared_ptr<This> shared_ptr;
│ │ │ +
71
│ │ │ +
72 public:
│ │ │ +
73 typedef CLIQUE Clique;
│ │ │ +
74 typedef boost::shared_ptr<Clique> sharedClique;
│ │ │ +
75 typedef Clique Node;
│ │ │ + │ │ │ +
77 typedef typename CLIQUE::ConditionalType ConditionalType;
│ │ │ +
78 typedef boost::shared_ptr<ConditionalType> sharedConditional;
│ │ │ +
79 typedef typename CLIQUE::BayesNetType BayesNetType;
│ │ │ +
80 typedef boost::shared_ptr<BayesNetType> sharedBayesNet;
│ │ │ +
81 typedef typename CLIQUE::FactorType FactorType;
│ │ │ +
82 typedef boost::shared_ptr<FactorType> sharedFactor;
│ │ │ +
83 typedef typename CLIQUE::FactorGraphType FactorGraphType;
│ │ │ +
84 typedef boost::shared_ptr<FactorGraphType> sharedFactorGraph;
│ │ │ +
85 typedef typename FactorGraphType::Eliminate Eliminate;
│ │ │ +
86 typedef typename CLIQUE::EliminationTraitsType EliminationTraitsType;
│ │ │ +
87
│ │ │ + │ │ │
90
│ │ │ -
91 }
│ │ │ -
92}
│ │ │ - │ │ │ -
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ -
FastVector< typename TREE::sharedFactor > EliminateTree(RESULT &result, const TREE &tree, const typename TREE::Eliminate &function)
Eliminate an elimination tree or a Bayes tree (used internally).
Definition inference-inst.h:75
│ │ │ + │ │ │ +
93
│ │ │ + │ │ │ +
96
│ │ │ +
97 protected:
│ │ │ +
98
│ │ │ + │ │ │ +
101
│ │ │ + │ │ │ +
104
│ │ │ +
107
│ │ │ + │ │ │ +
110
│ │ │ +
112 BayesTree(const This& other);
│ │ │ +
113
│ │ │ +
115
│ │ │ +
117 This& operator=(const This& other);
│ │ │ +
118
│ │ │ +
121
│ │ │ +
123 bool equals(const This& other, double tol = 1e-9) const;
│ │ │ +
124
│ │ │ +
125 public:
│ │ │ +
127 void print(const std::string& s = "",
│ │ │ +
128 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
130
│ │ │ +
133
│ │ │ +
135 size_t size() const;
│ │ │ +
136
│ │ │ +
│ │ │ +
138 inline bool empty() const {
│ │ │ +
139 return nodes_.empty();
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
143 const Nodes& nodes() const { return nodes_; }
│ │ │ +
144
│ │ │ +
146 sharedClique operator[](Key j) const { return nodes_.at(j); }
│ │ │ +
147
│ │ │ +
149 const Roots& roots() const { return roots_; }
│ │ │ +
150
│ │ │ +
│ │ │ +
152 const sharedClique& clique(Key j) const {
│ │ │ +
153 typename Nodes::const_iterator c = nodes_.find(j);
│ │ │ +
154 if(c == nodes_.end())
│ │ │ +
155 throw std::out_of_range("Requested the BayesTree clique for a key that is not in the BayesTree");
│ │ │ +
156 else
│ │ │ +
157 return c->second;
│ │ │ +
158 }
│ │ │ +
│ │ │ +
159
│ │ │ + │ │ │ +
162
│ │ │ +
164 size_t numCachedSeparatorMarginals() const;
│ │ │ +
165
│ │ │ +
171 sharedConditional marginalFactor(Key j, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
│ │ │ +
172
│ │ │ +
177 sharedFactorGraph joint(Key j1, Key j2, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
│ │ │ +
178
│ │ │ +
183 sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate& function = EliminationTraitsType::DefaultEliminate) const;
│ │ │ +
184
│ │ │ +
187
│ │ │ +
189 void dot(std::ostream& os, const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
190
│ │ │ +
192 std::string dot(
│ │ │ +
193 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
194
│ │ │ +
196 void saveGraph(const std::string& filename,
│ │ │ +
197 const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
│ │ │ +
198
│ │ │ +
202
│ │ │ +
207 template<class CONTAINER>
│ │ │ +
208 Key findParentClique(const CONTAINER& parents) const;
│ │ │ +
209
│ │ │ +
211 void clear();
│ │ │ +
212
│ │ │ + │ │ │ +
215
│ │ │ +
220 void removePath(sharedClique clique, BayesNetType* bn, Cliques* orphans);
│ │ │ +
221
│ │ │ +
226 void removeTop(const KeyVector& keys, BayesNetType* bn, Cliques* orphans);
│ │ │ +
227
│ │ │ +
230 Cliques removeSubtree(const sharedClique& subtree);
│ │ │ +
231
│ │ │ +
235 void insertRoot(const sharedClique& subtree);
│ │ │ +
236
│ │ │ +
238 void addClique(const sharedClique& clique, const sharedClique& parent_clique = sharedClique());
│ │ │ +
239
│ │ │ + │ │ │ +
242
│ │ │ +
243 protected:
│ │ │ +
244
│ │ │ +
246 void dot(std::ostream &s, sharedClique clique, const KeyFormatter& keyFormatter,
│ │ │ +
247 int parentnum = 0) const;
│ │ │ +
248
│ │ │ + │ │ │ +
251
│ │ │ + │ │ │ +
254
│ │ │ +
256 void fillNodesIndex(const sharedClique& subtree);
│ │ │ +
257
│ │ │ +
258 // Friend JunctionTree because it directly fills roots and nodes index.
│ │ │ +
259 template<class BAYESTREE, class GRAPH> friend class EliminatableClusterTree;
│ │ │ +
260
│ │ │ +
261 private:
│ │ │ + │ │ │ +
264 template<class ARCHIVE>
│ │ │ +
265 void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
│ │ │ +
266 ar & BOOST_SERIALIZATION_NVP(nodes_);
│ │ │ +
267 ar & BOOST_SERIALIZATION_NVP(roots_);
│ │ │ +
268 }
│ │ │ +
269
│ │ │ +
271
│ │ │ +
272 }; // BayesTree
│ │ │ +
│ │ │ +
273
│ │ │ +
274 /* ************************************************************************* */
│ │ │ +
275 template <class CLIQUE, typename = void>
│ │ │ +
│ │ │ +
276 class BayesTreeOrphanWrapper : public CLIQUE::ConditionalType {
│ │ │ +
277 public:
│ │ │ +
278 typedef CLIQUE CliqueType;
│ │ │ +
279 typedef typename CLIQUE::ConditionalType Base;
│ │ │ +
280
│ │ │ +
281 boost::shared_ptr<CliqueType> clique;
│ │ │ +
282
│ │ │ +
│ │ │ +
293 BayesTreeOrphanWrapper(const boost::shared_ptr<CliqueType>& clique)
│ │ │ +
294 : clique(clique) {
│ │ │ +
295 this->keys_.assign(clique->conditional()->beginParents(),
│ │ │ +
296 clique->conditional()->endParents());
│ │ │ +
297 }
│ │ │ +
│ │ │ +
298
│ │ │ +
299 void print(
│ │ │ +
300 const std::string& s = "",
│ │ │ +
301 const KeyFormatter& formatter = DefaultKeyFormatter) const override {
│ │ │ +
302 clique->print(s + "stored clique", formatter);
│ │ │ +
303 }
│ │ │ +
304 };
│ │ │ +
│ │ │ +
305
│ │ │ +
306}
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
A thin wrapper around std::list that uses boost's fast_pool_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
│ │ │ -
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< 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::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
│ │ │ +
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition ConcurrentMap.h:68
│ │ │ +
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │ +
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ +
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
A cluster-tree that eliminates to a Bayes tree.
Definition ClusterTree.h:184
│ │ │ +
clique statistics
Definition BayesTree.h:39
│ │ │ +
store all the sizes
Definition BayesTree.h:48
│ │ │ +
Bayes tree.
Definition BayesTree.h:67
│ │ │ +
Nodes nodes_
Map from indices to Clique.
Definition BayesTree.h:100
│ │ │ +
void removeClique(sharedClique clique)
remove a clique: warning, can result in a forest
Definition BayesTree-inst.h:424
│ │ │ +
sharedFactorGraph joint(Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
return joint on two variables Limitation: can only calculate joint if cliques are disjoint or one of ...
Definition BayesTree-inst.h:293
│ │ │ +
void fillNodesIndex(const sharedClique &subtree)
Fill the nodes index for a subtree.
Definition BayesTree-inst.h:246
│ │ │ +
void dot(std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output to graphviz format, stream version.
Definition BayesTree-inst.h:64
│ │ │ +
void addFactorsToGraph(FactorGraph< FactorType > *graph) const
Add all cliques in this BayesTree to the specified factor graph.
Definition BayesTree-inst.h:168
│ │ │ +
sharedClique operator[](Key j) const
Access node by variable.
Definition BayesTree.h:146
│ │ │ +
This & operator=(const This &other)
Assignment operator.
Definition BayesTree-inst.h:199
│ │ │ +
boost::shared_ptr< Clique > sharedClique
Shared pointer to a clique.
Definition BayesTree.h:74
│ │ │ +
BayesTree()
Create an empty Bayes Tree.
Definition BayesTree.h:109
│ │ │ +
Clique Node
Synonym for Clique (TODO: remove)
Definition BayesTree.h:75
│ │ │ +
void clear()
Remove all nodes.
Definition BayesTree-inst.h:408
│ │ │ +
Roots roots_
Root cliques.
Definition BayesTree.h:103
│ │ │ +
void addClique(const sharedClique &clique, const sharedClique &parent_clique=sharedClique())
add a clique (top down)
Definition BayesTree-inst.h:142
│ │ │ +
sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
return joint on two variables as a BayesNet Limitation: can only calculate joint if cliques are disjo...
Definition BayesTree-inst.h:302
│ │ │ +
sharedClique sharedNode
Synonym for sharedClique (TODO: remove)
Definition BayesTree.h:76
│ │ │ +
Key findParentClique(const CONTAINER &parents) const
Find parent clique of a conditional.
Definition BayesTree-inst.h:238
│ │ │ +
size_t size() const
number of cliques
Definition BayesTree-inst.h:133
│ │ │ +
void deleteCachedShortcuts()
Clear all shortcut caches - use before timing on marginal calculation to avoid residual cache data.
Definition BayesTree-inst.h:416
│ │ │ +
void removePath(sharedClique clique, BayesNetType *bn, Cliques *orphans)
Remove path from clique to root and return that path as factors plus a list of orphaned subtree roots...
Definition BayesTree-inst.h:448
│ │ │ +
const Nodes & nodes() const
Return nodes.
Definition BayesTree.h:143
│ │ │ +
FastList< sharedClique > Cliques
A convenience class for a list of shared cliques.
Definition BayesTree.h:89
│ │ │ +
CLIQUE Clique
The clique type, normally BayesTreeClique.
Definition BayesTree.h:73
│ │ │ +
sharedConditional marginalFactor(Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
Return marginal on any variable.
Definition BayesTree-inst.h:270
│ │ │ +
const Roots & roots() const
return root cliques
Definition BayesTree.h:149
│ │ │ +
const sharedClique & clique(Key j) const
alternate syntax for matlab: find the clique that contains the variable with Key j
Definition BayesTree.h:152
│ │ │ +
ConcurrentMap< Key, sharedClique > Nodes
Map from keys to Clique.
Definition BayesTree.h:92
│ │ │ +
friend class boost::serialization::access
Serialization function.
Definition BayesTree.h:263
│ │ │ +
size_t numCachedSeparatorMarginals() const
Collect number of cliques with cached separator marginals.
Definition BayesTree-inst.h:55
│ │ │ +
BayesTreeCliqueData getCliqueData() const
Gather data on all cliques.
Definition BayesTree-inst.h:35
│ │ │ +
Cliques removeSubtree(const sharedClique &subtree)
Remove the requested subtree.
Definition BayesTree-inst.h:496
│ │ │ +
bool empty() const
Check if there are any cliques in the tree.
Definition BayesTree.h:138
│ │ │ +
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition BayesTree-inst.h:212
│ │ │ +
void insertRoot(const sharedClique &subtree)
Insert a new subtree with known parent clique.
Definition BayesTree-inst.h:260
│ │ │ +
void saveGraph(const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
output to file with graphviz format.
Definition BayesTree-inst.h:85
│ │ │ +
void removeTop(const KeyVector &keys, BayesNetType *bn, Cliques *orphans)
Given a list of indices, turn "contaminated" part of the tree back into a factor graph.
Definition BayesTree-inst.h:475
│ │ │ +
FastVector< sharedClique > Roots
Root cliques.
Definition BayesTree.h:95
│ │ │ +
Definition BayesTree.h:276
│ │ │ +
BayesTreeOrphanWrapper(const boost::shared_ptr< CliqueType > &clique)
Construct a new Bayes Tree Orphan Wrapper object.
Definition BayesTree.h:293
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,127 +1,451 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -inference-inst.h │ │ │ │ +BayesTree.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// \callgraph │ │ │ │ +19 │ │ │ │ 20#pragma once │ │ │ │ 21 │ │ │ │ 22#include │ │ │ │ -23#include │ │ │ │ -24 │ │ │ │ -25#include <_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> │ │ │ │ -26#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ -27 │ │ │ │ -28namespace _g_t_s_a_m { │ │ │ │ -29 namespace inference { │ │ │ │ +23 │ │ │ │ +24#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ +25#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_L_i_s_t_._h> │ │ │ │ +26#include │ │ │ │ +27#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +28 │ │ │ │ +29#include │ │ │ │ 30 │ │ │ │ -31 namespace { │ │ │ │ -32 /* ************************************************************************* │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +33 // Forward declarations │ │ │ │ +34 template class FactorGraph; │ │ │ │ +35 template class EliminatableClusterTree; │ │ │ │ +36 │ │ │ │ +37 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -33 template │ │ │ │ -34 struct EliminationData { │ │ │ │ -35 EliminationData* const parentData; │ │ │ │ -36 FastVector childFactors; │ │ │ │ -37 EliminationData(EliminationData* _parentData, size_t nChildren) : │ │ │ │ -38 parentData(_parentData) { childFactors.reserve(nChildren); } │ │ │ │ -39 }; │ │ │ │ -40 │ │ │ │ -41 /* ************************************************************************* │ │ │ │ +_3_9 struct GTSAM_EXPORT _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_S_t_a_t_s { │ │ │ │ +40 double avgConditionalSize; │ │ │ │ +41 std::size_t maxConditionalSize; │ │ │ │ +42 double avgSeparatorSize; │ │ │ │ +43 std::size_t maxSeparatorSize; │ │ │ │ +44 void _p_r_i_n_t(const std::string& s = "") const ; │ │ │ │ +45 }; │ │ │ │ +46 │ │ │ │ +_4_8 struct GTSAM_EXPORT _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a { │ │ │ │ +49 _F_a_s_t_V_e_c_t_o_r_<_s_t_d_:_:_s_i_z_e___t_> conditionalSizes; │ │ │ │ +50 _F_a_s_t_V_e_c_t_o_r_<_s_t_d_:_:_s_i_z_e___t_> separatorSizes; │ │ │ │ +51 _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_S_t_a_t_s getStats() const; │ │ │ │ +52 }; │ │ │ │ +53 │ │ │ │ +54 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -42 template │ │ │ │ -43 EliminationData eliminationPreOrderVisitor( │ │ │ │ -44 const typename TREE::sharedNode& node, EliminationData& parentData) │ │ │ │ -45 { │ │ │ │ -46 // This function is called before visiting the children. Here, we create │ │ │ │ -this node's data, │ │ │ │ -47 // which includes a pointer to the parent data and space for the factors of │ │ │ │ -the children. │ │ │ │ -48 return EliminationData(&parentData, node->children.size()); │ │ │ │ -49 } │ │ │ │ -50 │ │ │ │ -51 /* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -52 template │ │ │ │ -53 struct EliminationPostOrderVisitor │ │ │ │ -54 { │ │ │ │ -55 RESULT& result; │ │ │ │ -56 const typename TREE::Eliminate& eliminationFunction; │ │ │ │ -57 EliminationPostOrderVisitor(RESULT& result, const typename TREE::Eliminate& │ │ │ │ -eliminationFunction) : │ │ │ │ -58 result(result), eliminationFunction(eliminationFunction) {} │ │ │ │ -59 void operator()(const typename TREE::sharedNode& node, │ │ │ │ -EliminationData& myData) │ │ │ │ -60 { │ │ │ │ -61 // Call eliminate on the node and add the result to the parent's gathered │ │ │ │ -factors │ │ │ │ -62 typename TREE::sharedFactor childFactor = node->eliminate(result, │ │ │ │ -eliminationFunction, myData.childFactors); │ │ │ │ -63 if(childFactor && !childFactor->empty()) │ │ │ │ -64 myData.parentData->childFactors.push_back(childFactor); │ │ │ │ -65 } │ │ │ │ -66 }; │ │ │ │ -67 } │ │ │ │ -68 │ │ │ │ -69 /* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -73 template │ │ │ │ -74 FastVector │ │ │ │ -_7_5 _E_l_i_m_i_n_a_t_e_T_r_e_e(RESULT& result, const TREE& tree, const typename TREE:: │ │ │ │ -Eliminate& function) │ │ │ │ -76 { │ │ │ │ -77 // Do elimination using a depth-first traversal. During the pre-order visit │ │ │ │ -(see │ │ │ │ -78 // eliminationPreOrderVisitor), we store a pointer to the parent data (where │ │ │ │ -we'll put the │ │ │ │ -79 // remaining factor) and reserve a vector of factors to store the children │ │ │ │ -elimination │ │ │ │ -80 // results. During the post-order visit (see eliminationPostOrderVisitor), │ │ │ │ -we call dense │ │ │ │ -81 // elimination (using the gathered child factors) and store the result in │ │ │ │ -the parent's │ │ │ │ -82 // gathered factors. │ │ │ │ -83 EliminationData rootData(0, tree.roots().size()); │ │ │ │ -84 EliminationPostOrderVisitor visitorPost(result, function); │ │ │ │ -85 _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(tree, rootData, │ │ │ │ -eliminationPreOrderVisitor, visitorPost); │ │ │ │ -86 │ │ │ │ -87 // Return remaining factors │ │ │ │ -88 return rootData.childFactors; │ │ │ │ -89 } │ │ │ │ +65 template │ │ │ │ +_6_6 class _B_a_y_e_s_T_r_e_e │ │ │ │ +67 { │ │ │ │ +68 protected: │ │ │ │ +69 typedef _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_> _T_h_i_s; │ │ │ │ +70 typedef boost::shared_ptr shared_ptr; │ │ │ │ +71 │ │ │ │ +72 public: │ │ │ │ +_7_3 typedef CLIQUE _C_l_i_q_u_e; │ │ │ │ +_7_4 typedef boost::shared_ptr _s_h_a_r_e_d_C_l_i_q_u_e; │ │ │ │ +_7_5 typedef _C_l_i_q_u_e _N_o_d_e; │ │ │ │ +_7_6 typedef _s_h_a_r_e_d_C_l_i_q_u_e _s_h_a_r_e_d_N_o_d_e; │ │ │ │ +77 typedef typename CLIQUE::ConditionalType ConditionalType; │ │ │ │ +78 typedef boost::shared_ptr sharedConditional; │ │ │ │ +79 typedef typename CLIQUE::BayesNetType BayesNetType; │ │ │ │ +80 typedef boost::shared_ptr sharedBayesNet; │ │ │ │ +81 typedef typename CLIQUE::FactorType FactorType; │ │ │ │ +82 typedef boost::shared_ptr sharedFactor; │ │ │ │ +83 typedef typename CLIQUE::FactorGraphType FactorGraphType; │ │ │ │ +84 typedef boost::shared_ptr sharedFactorGraph; │ │ │ │ +85 typedef typename FactorGraphType::Eliminate Eliminate; │ │ │ │ +86 typedef typename CLIQUE::EliminationTraitsType EliminationTraitsType; │ │ │ │ +87 │ │ │ │ +_8_9 typedef _F_a_s_t_L_i_s_t_<_s_h_a_r_e_d_C_l_i_q_u_e_> _C_l_i_q_u_e_s; │ │ │ │ 90 │ │ │ │ -91 } │ │ │ │ -92} │ │ │ │ -_t_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ +_9_2 typedef _C_o_n_c_u_r_r_e_n_t_M_a_p_<_K_e_y_,_ _s_h_a_r_e_d_C_l_i_q_u_e_> _N_o_d_e_s; │ │ │ │ +93 │ │ │ │ +_9_5 typedef _F_a_s_t_V_e_c_t_o_r_<_s_h_a_r_e_d_C_l_i_q_u_e_> _R_o_o_t_s; │ │ │ │ +96 │ │ │ │ +97 protected: │ │ │ │ +98 │ │ │ │ +_1_0_0 _N_o_d_e_s _n_o_d_e_s__; │ │ │ │ +101 │ │ │ │ +_1_0_3 _R_o_o_t_s _r_o_o_t_s__; │ │ │ │ +104 │ │ │ │ +107 │ │ │ │ +_1_0_9 _B_a_y_e_s_T_r_e_e() {} │ │ │ │ +110 │ │ │ │ +112 _B_a_y_e_s_T_r_e_e(const This& other); │ │ │ │ +113 │ │ │ │ +115 │ │ │ │ +117 This& _o_p_e_r_a_t_o_r_=(const This& other); │ │ │ │ +118 │ │ │ │ +121 │ │ │ │ +123 bool _e_q_u_a_l_s(const This& other, double tol = 1e-9) const; │ │ │ │ +124 │ │ │ │ +125 public: │ │ │ │ +127 void _p_r_i_n_t(const std::string& s = "", │ │ │ │ +128 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ +130 │ │ │ │ +133 │ │ │ │ +135 size_t _s_i_z_e() const; │ │ │ │ +136 │ │ │ │ +_1_3_8 inline bool _e_m_p_t_y() const { │ │ │ │ +139 return _n_o_d_e_s__.empty(); │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +_1_4_3 const _N_o_d_e_s& _n_o_d_e_s() const { return _n_o_d_e_s__; } │ │ │ │ +144 │ │ │ │ +_1_4_6 _s_h_a_r_e_d_C_l_i_q_u_e _o_p_e_r_a_t_o_r_[_](_K_e_y j) const { return _n_o_d_e_s__.at(j); } │ │ │ │ +147 │ │ │ │ +_1_4_9 const _R_o_o_t_s& _r_o_o_t_s() const { return _r_o_o_t_s__; } │ │ │ │ +150 │ │ │ │ +_1_5_2 const _s_h_a_r_e_d_C_l_i_q_u_e& _c_l_i_q_u_e(_K_e_y j) const { │ │ │ │ +153 typename Nodes::const_iterator c = _n_o_d_e_s__.find(j); │ │ │ │ +154 if(c == _n_o_d_e_s__.end()) │ │ │ │ +155 throw std::out_of_range("Requested the BayesTree clique for a key that is │ │ │ │ +not in the BayesTree"); │ │ │ │ +156 else │ │ │ │ +157 return c->second; │ │ │ │ +158 } │ │ │ │ +159 │ │ │ │ +161 _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a _g_e_t_C_l_i_q_u_e_D_a_t_a() const; │ │ │ │ +162 │ │ │ │ +164 size_t _n_u_m_C_a_c_h_e_d_S_e_p_a_r_a_t_o_r_M_a_r_g_i_n_a_l_s() const; │ │ │ │ +165 │ │ │ │ +171 sharedConditional _m_a_r_g_i_n_a_l_F_a_c_t_o_r(_K_e_y j, const Eliminate& function = │ │ │ │ +EliminationTraitsType::DefaultEliminate) const; │ │ │ │ +172 │ │ │ │ +177 sharedFactorGraph _j_o_i_n_t(_K_e_y j1, _K_e_y j2, const Eliminate& function = │ │ │ │ +EliminationTraitsType::DefaultEliminate) const; │ │ │ │ +178 │ │ │ │ +183 sharedBayesNet _j_o_i_n_t_B_a_y_e_s_N_e_t(_K_e_y j1, _K_e_y j2, const Eliminate& function = │ │ │ │ +EliminationTraitsType::DefaultEliminate) const; │ │ │ │ +184 │ │ │ │ +187 │ │ │ │ +189 void _d_o_t(std::ostream& os, const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = │ │ │ │ +DefaultKeyFormatter) const; │ │ │ │ +190 │ │ │ │ +192 std::string _d_o_t( │ │ │ │ +193 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ +194 │ │ │ │ +196 void _s_a_v_e_G_r_a_p_h(const std::string& filename, │ │ │ │ +197 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter = DefaultKeyFormatter) const; │ │ │ │ +198 │ │ │ │ +202 │ │ │ │ +207 template │ │ │ │ +208 _K_e_y _f_i_n_d_P_a_r_e_n_t_C_l_i_q_u_e(const CONTAINER& parents) const; │ │ │ │ +209 │ │ │ │ +211 void _c_l_e_a_r(); │ │ │ │ +212 │ │ │ │ +214 void _d_e_l_e_t_e_C_a_c_h_e_d_S_h_o_r_t_c_u_t_s(); │ │ │ │ +215 │ │ │ │ +220 void _r_e_m_o_v_e_P_a_t_h(_s_h_a_r_e_d_C_l_i_q_u_e _c_l_i_q_u_e, BayesNetType* bn, _C_l_i_q_u_e_s* orphans); │ │ │ │ +221 │ │ │ │ +226 void _r_e_m_o_v_e_T_o_p(const _K_e_y_V_e_c_t_o_r& keys, BayesNetType* bn, _C_l_i_q_u_e_s* orphans); │ │ │ │ +227 │ │ │ │ +230 _C_l_i_q_u_e_s _r_e_m_o_v_e_S_u_b_t_r_e_e(const _s_h_a_r_e_d_C_l_i_q_u_e& subtree); │ │ │ │ +231 │ │ │ │ +235 void _i_n_s_e_r_t_R_o_o_t(const _s_h_a_r_e_d_C_l_i_q_u_e& subtree); │ │ │ │ +236 │ │ │ │ +238 void _a_d_d_C_l_i_q_u_e(const _s_h_a_r_e_d_C_l_i_q_u_e& _c_l_i_q_u_e, const _s_h_a_r_e_d_C_l_i_q_u_e& │ │ │ │ +parent_clique = _s_h_a_r_e_d_C_l_i_q_u_e()); │ │ │ │ +239 │ │ │ │ +241 void _a_d_d_F_a_c_t_o_r_s_T_o_G_r_a_p_h(_F_a_c_t_o_r_G_r_a_p_h_<_F_a_c_t_o_r_T_y_p_e_>* graph) const; │ │ │ │ +242 │ │ │ │ +243 protected: │ │ │ │ +244 │ │ │ │ +246 void _d_o_t(std::ostream &s, _s_h_a_r_e_d_C_l_i_q_u_e _c_l_i_q_u_e, const _K_e_y_F_o_r_m_a_t_t_e_r& │ │ │ │ +keyFormatter, │ │ │ │ +247 int parentnum = 0) const; │ │ │ │ +248 │ │ │ │ +250 void _g_e_t_C_l_i_q_u_e_D_a_t_a(_s_h_a_r_e_d_C_l_i_q_u_e _c_l_i_q_u_e, _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a* stats) const; │ │ │ │ +251 │ │ │ │ +253 void _r_e_m_o_v_e_C_l_i_q_u_e(_s_h_a_r_e_d_C_l_i_q_u_e _c_l_i_q_u_e); │ │ │ │ +254 │ │ │ │ +256 void _f_i_l_l_N_o_d_e_s_I_n_d_e_x(const _s_h_a_r_e_d_C_l_i_q_u_e& subtree); │ │ │ │ +257 │ │ │ │ +258 // Friend JunctionTree because it directly fills roots and nodes index. │ │ │ │ +259 template friend class │ │ │ │ +_E_l_i_m_i_n_a_t_a_b_l_e_C_l_u_s_t_e_r_T_r_e_e; │ │ │ │ +260 │ │ │ │ +261 private: │ │ │ │ +_2_6_3 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; │ │ │ │ +264 template │ │ │ │ +265 void serialize(ARCHIVE & ar, const unsigned int /*version*/) { │ │ │ │ +266 ar & BOOST_SERIALIZATION_NVP(_n_o_d_e_s__); │ │ │ │ +267 ar & BOOST_SERIALIZATION_NVP(_r_o_o_t_s__); │ │ │ │ +268 } │ │ │ │ +269 │ │ │ │ +271 │ │ │ │ +272 }; // BayesTree │ │ │ │ +273 │ │ │ │ +274 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +275 template │ │ │ │ +_2_7_6 class _B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r : public CLIQUE::ConditionalType { │ │ │ │ +277 public: │ │ │ │ +278 typedef CLIQUE CliqueType; │ │ │ │ +279 typedef typename CLIQUE::ConditionalType Base; │ │ │ │ +280 │ │ │ │ +281 boost::shared_ptr clique; │ │ │ │ +282 │ │ │ │ +_2_9_3 _B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r(const boost::shared_ptr& clique) │ │ │ │ +294 : clique(clique) { │ │ │ │ +295 this->keys_.assign(clique->conditional()->beginParents(), │ │ │ │ +296 clique->conditional()->endParents()); │ │ │ │ +297 } │ │ │ │ +298 │ │ │ │ +299 void print( │ │ │ │ +300 const std::string& s = "", │ │ │ │ +301 const _K_e_y_F_o_r_m_a_t_t_e_r& formatter = DefaultKeyFormatter) const override { │ │ │ │ +302 clique->print(s + "stored clique", formatter); │ │ │ │ +303 } │ │ │ │ +304 }; │ │ │ │ +305 │ │ │ │ +306} │ │ │ │ _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_:_:_i_n_f_e_r_e_n_c_e_:_:_E_l_i_m_i_n_a_t_e_T_r_e_e │ │ │ │ -FastVector< typename TREE::sharedFactor > EliminateTree(RESULT &result, const │ │ │ │ -TREE &tree, const typename TREE::Eliminate &function) │ │ │ │ -Eliminate an elimination tree or a Bayes tree (used internally). │ │ │ │ -DDeeffiinniittiioonn inference-inst.h:75 │ │ │ │ +_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_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_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_:_:_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_:_:_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 │ │ │ │ +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_:_:_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_:_:_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_:_:_e_q_u_a_l_s │ │ │ │ +Template to create a binary predicate. │ │ │ │ +DDeeffiinniittiioonn Testable.h:111 │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ +nodes. │ │ │ │ +DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_g_t_s_a_m_:_:_E_l_i_m_i_n_a_t_a_b_l_e_C_l_u_s_t_e_r_T_r_e_e │ │ │ │ +A cluster-tree that eliminates to a Bayes tree. │ │ │ │ +DDeeffiinniittiioonn ClusterTree.h:184 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_S_t_a_t_s │ │ │ │ +clique statistics │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:39 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a │ │ │ │ +store all the sizes │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:48 │ │ │ │ +_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_:_:_n_o_d_e_s__ │ │ │ │ +Nodes nodes_ │ │ │ │ +Map from indices to Clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:100 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_C_l_i_q_u_e │ │ │ │ +void removeClique(sharedClique clique) │ │ │ │ +remove a clique: warning, can result in a forest │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:424 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_j_o_i_n_t │ │ │ │ +sharedFactorGraph joint(Key j1, Key j2, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +return joint on two variables Limitation: can only calculate joint if cliques │ │ │ │ +are disjoint or one of ... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:293 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_f_i_l_l_N_o_d_e_s_I_n_d_e_x │ │ │ │ +void fillNodesIndex(const sharedClique &subtree) │ │ │ │ +Fill the nodes index for a subtree. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:246 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_d_o_t │ │ │ │ +void dot(std::ostream &os, const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +Output to graphviz format, stream version. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:64 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_a_d_d_F_a_c_t_o_r_s_T_o_G_r_a_p_h │ │ │ │ +void addFactorsToGraph(FactorGraph< FactorType > *graph) const │ │ │ │ +Add all cliques in this BayesTree to the specified factor graph. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:168 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +sharedClique operator[](Key j) const │ │ │ │ +Access node by variable. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:146 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +This & operator=(const This &other) │ │ │ │ +Assignment operator. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:199 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_h_a_r_e_d_C_l_i_q_u_e │ │ │ │ +boost::shared_ptr< Clique > sharedClique │ │ │ │ +Shared pointer to a clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:74 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_B_a_y_e_s_T_r_e_e │ │ │ │ +BayesTree() │ │ │ │ +Create an empty Bayes Tree. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:109 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_N_o_d_e │ │ │ │ +Clique Node │ │ │ │ +Synonym for Clique (TODO: remove) │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:75 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_c_l_e_a_r │ │ │ │ +void clear() │ │ │ │ +Remove all nodes. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:408 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_o_o_t_s__ │ │ │ │ +Roots roots_ │ │ │ │ +Root cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:103 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_a_d_d_C_l_i_q_u_e │ │ │ │ +void addClique(const sharedClique &clique, const sharedClique │ │ │ │ +&parent_clique=sharedClique()) │ │ │ │ +add a clique (top down) │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:142 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_j_o_i_n_t_B_a_y_e_s_N_e_t │ │ │ │ +sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +return joint on two variables as a BayesNet Limitation: can only calculate │ │ │ │ +joint if cliques are disjo... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:302 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_h_a_r_e_d_N_o_d_e │ │ │ │ +sharedClique sharedNode │ │ │ │ +Synonym for sharedClique (TODO: remove) │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:76 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_f_i_n_d_P_a_r_e_n_t_C_l_i_q_u_e │ │ │ │ +Key findParentClique(const CONTAINER &parents) const │ │ │ │ +Find parent clique of a conditional. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:238 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_i_z_e │ │ │ │ +size_t size() const │ │ │ │ +number of cliques │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:133 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_d_e_l_e_t_e_C_a_c_h_e_d_S_h_o_r_t_c_u_t_s │ │ │ │ +void deleteCachedShortcuts() │ │ │ │ +Clear all shortcut caches - use before timing on marginal calculation to avoid │ │ │ │ +residual cache data. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:416 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_P_a_t_h │ │ │ │ +void removePath(sharedClique clique, BayesNetType *bn, Cliques *orphans) │ │ │ │ +Remove path from clique to root and return that path as factors plus a list of │ │ │ │ +orphaned subtree roots... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:448 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_n_o_d_e_s │ │ │ │ +const Nodes & nodes() const │ │ │ │ +Return nodes. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:143 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_C_l_i_q_u_e_s │ │ │ │ +FastList< sharedClique > Cliques │ │ │ │ +A convenience class for a list of shared cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:89 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_C_l_i_q_u_e │ │ │ │ +CLIQUE Clique │ │ │ │ +The clique type, normally BayesTreeClique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:73 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_m_a_r_g_i_n_a_l_F_a_c_t_o_r │ │ │ │ +sharedConditional marginalFactor(Key j, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +Return marginal on any variable. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:270 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_o_o_t_s │ │ │ │ +const Roots & roots() const │ │ │ │ +return root cliques │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:149 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_c_l_i_q_u_e │ │ │ │ +const sharedClique & clique(Key j) const │ │ │ │ +alternate syntax for matlab: find the clique that contains the variable with │ │ │ │ +Key j │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:152 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_N_o_d_e_s │ │ │ │ +ConcurrentMap< Key, sharedClique > Nodes │ │ │ │ +Map from keys to Clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:92 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_a_c_c_e_s_s │ │ │ │ +friend class boost::serialization::access │ │ │ │ +Serialization function. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:263 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_n_u_m_C_a_c_h_e_d_S_e_p_a_r_a_t_o_r_M_a_r_g_i_n_a_l_s │ │ │ │ +size_t numCachedSeparatorMarginals() const │ │ │ │ +Collect number of cliques with cached separator marginals. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:55 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_g_e_t_C_l_i_q_u_e_D_a_t_a │ │ │ │ +BayesTreeCliqueData getCliqueData() const │ │ │ │ +Gather data on all cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:35 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_S_u_b_t_r_e_e │ │ │ │ +Cliques removeSubtree(const sharedClique &subtree) │ │ │ │ +Remove the requested subtree. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:496 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +Check if there are any cliques in the tree. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:138 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="", const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:212 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_i_n_s_e_r_t_R_o_o_t │ │ │ │ +void insertRoot(const sharedClique &subtree) │ │ │ │ +Insert a new subtree with known parent clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:260 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_a_v_e_G_r_a_p_h │ │ │ │ +void saveGraph(const std::string &filename, const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +output to file with graphviz format. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:85 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_T_o_p │ │ │ │ +void removeTop(const KeyVector &keys, BayesNetType *bn, Cliques *orphans) │ │ │ │ +Given a list of indices, turn "contaminated" part of the tree back into a │ │ │ │ +factor graph. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:475 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_R_o_o_t_s │ │ │ │ +FastVector< sharedClique > Roots │ │ │ │ +Root cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:95 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:276 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r_:_:_B_a_y_e_s_T_r_e_e_O_r_p_h_a_n_W_r_a_p_p_e_r │ │ │ │ +BayesTreeOrphanWrapper(const boost::shared_ptr< CliqueType > &clique) │ │ │ │ +Construct a new Bayes Tree Orphan Wrapper object. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:293 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _i_n_f_e_r_e_n_c_e_-_i_n_s_t_._h │ │ │ │ + * _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/a00581.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/graph.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/BayesTree.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,84 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
graph.h File Reference
│ │ │ +Namespaces
│ │ │ +
BayesTree.cpp File Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

Graph algorithm using boost library. │ │ │ +

Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ More...

│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::SDGraph< KEY >
 SDGraph is undirected graph with variable keys and double edge weights. More...
 
class  gtsam::SGraph< KEY >
 
class  gtsam::PredecessorMap< KEY >
 Map from variable key to parent key. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

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

│ │ │ -Functions

│ │ │ -template<class KEY >
std::list< KEY > gtsam::predecessorMap2Keys (const PredecessorMap< KEY > &p_map)
 Generate a list of keys from a spanning tree represented by its predecessor map.
 
│ │ │ -template<class G , class F , class KEY >
SDGraph< KEY > gtsam::toBoostGraph (const G &graph)
 Convert the factor graph to an SDGraph G = Graph type F = Factor type Key = Key type.
 
template<class G , class V , class KEY >
boost::tuple< G, V, std::map< KEY, V > > gtsam::predecessorMap2Graph (const PredecessorMap< KEY > &p_map)
 Build takes a predecessor map, and builds a directed graph corresponding to the tree.
 
│ │ │ -template<class G , class Factor , class POSE , class KEY >
boost::shared_ptr< Valuesgtsam::composePoses (const G &graph, const PredecessorMap< KEY > &tree, const POSE &rootPose)
 Compose the poses by following the chain specified by the spanning tree.
 
│ │ │ -template<class G , class KEY , class FACTOR2 >
PredecessorMap< KEY > gtsam::findMinimumSpanningTree (const G &g)
 find the minimum spanning tree using boost graph library
 
│ │ │ -template<class G , class KEY , class FACTOR2 >
void gtsam::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 to the rest of the factors.
 
│ │ │

Detailed Description

│ │ │ -

Graph algorithm using boost library.

│ │ │ -
Author
: Kai Ni
│ │ │ -
Date
Jan 11, 2010
│ │ │ +

Bayes Tree is a tree of cliques of a Bayes Chain.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
│ │ │ +Michael Kaess
│ │ │ +
│ │ │ +Viorela Ila
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,75 +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 | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -graph.h File Reference │ │ │ │ -Graph algorithm using boost library. _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_D_G_r_a_p_h_<_ _K_E_Y_ _> │ │ │ │ -  _S_D_G_r_a_p_h is undirected graph with variable keys and double edge weights. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_S_G_r_a_p_h_<_ _K_E_Y_ _> │ │ │ │ -  │ │ │ │ -class   _g_t_s_a_m_:_:_P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_ _K_E_Y_ _> │ │ │ │ -  Map from variable key to parent key. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s │ │ │ │ +BayesTree.cpp File Reference │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - std::list< KEY >  ggttssaamm::::pprreeddeecceessssoorrMMaapp22KKeeyyss (const │ │ │ │ - _P_r_e_d_e_c_e_s_s_o_r_M_a_p< KEY > &p_map) │ │ │ │ -  Generate a list of keys from a spanning │ │ │ │ - tree represented by its predecessor map. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _S_D_G_r_a_p_h< KEY >  ggttssaamm::::ttooBBoooossttGGrraapphh (const G &graph) │ │ │ │ - Convert the factor graph to an _S_D_G_r_a_p_h G │ │ │ │ -  = Graph type F = _F_a_c_t_o_r type Key = Key │ │ │ │ - type. │ │ │ │ -  │ │ │ │ -template │ │ │ │ -boost::tuple< G, V, std::map< KEY, V > _g_t_s_a_m_:_:_p_r_e_d_e_c_e_s_s_o_r_M_a_p_2_G_r_a_p_h (const │ │ │ │ - >  _P_r_e_d_e_c_e_s_s_o_r_M_a_p< KEY > &p_map) │ │ │ │ - Build takes a predecessor map, and │ │ │ │ -  builds a directed graph corresponding to │ │ │ │ - the tree. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - boost::shared_ptr< _V_a_l_u_e_s >  ggttssaamm::::ccoommppoosseePPoosseess (const G &graph, │ │ │ │ - const _P_r_e_d_e_c_e_s_s_o_r_M_a_p< KEY > &tree, const │ │ │ │ - POSE &rootPose) │ │ │ │ -  Compose the poses by following the chain │ │ │ │ - specified by the spanning tree. │ │ │ │ -  │ │ │ │ -template │ │ │ │ - _P_r_e_d_e_c_e_s_s_o_r_M_a_p< KEY >  ggttssaamm::::ffiinnddMMiinniimmuummSSppaannnniinnggTTrreeee (const G │ │ │ │ - &g) │ │ │ │ -  find the minimum spanning tree using │ │ │ │ - boost graph library │ │ │ │ -  │ │ │ │ -template │ │ │ │ - void  ggttssaamm::::sspplliitt (const G &g, const │ │ │ │ - _P_r_e_d_e_c_e_s_s_o_r_M_a_p< KEY > &tree, G &Ab1, G │ │ │ │ - &Ab2) │ │ │ │ - Split the graph into two parts: one │ │ │ │ -  corresponds to the given spanning tree, │ │ │ │ - and the other corresponds to the rest of │ │ │ │ - the factors. │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ -Graph algorithm using boost library. │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ Author │ │ │ │ - : Kai Ni │ │ │ │ - Date │ │ │ │ - Jan 11, 2010 │ │ │ │ + Frank Dellaert │ │ │ │ + Michael Kaess │ │ │ │ + Viorela Ila │ │ │ │ + Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _g_r_a_p_h_._h │ │ │ │ + * _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/a00584_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/graph-inl.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/BayesTree-inst.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,338 +98,680 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
graph-inl.h
│ │ │ +
BayesTree-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 graph-inl.h
│ │ │ -
14 * @brief Graph algorithm using boost library
│ │ │ -
15 * @author Kai Ni
│ │ │ -
16 */
│ │ │ -
17
│ │ │ -
18#pragma once
│ │ │ -
19
│ │ │ -
20#include <stdexcept>
│ │ │ -
21#ifdef __GNUC__
│ │ │ -
22#pragma GCC diagnostic push
│ │ │ -
23#pragma GCC diagnostic ignored "-Wunused-variable"
│ │ │ -
24//#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration"
│ │ │ -
25#endif
│ │ │ -
26#include <boost/graph/breadth_first_search.hpp>
│ │ │ -
27#ifdef __GNUC__
│ │ │ -
28#pragma GCC diagnostic pop
│ │ │ -
29#endif
│ │ │ -
30#include <boost/graph/prim_minimum_spanning_tree.hpp>
│ │ │ -
31
│ │ │ - │ │ │ -
33
│ │ │ -
34namespace gtsam {
│ │ │ -
35
│ │ │ -
36/* ************************************************************************* */
│ │ │ -
37template <class KEY>
│ │ │ -
│ │ │ -
38class ordering_key_visitor : public boost::default_bfs_visitor {
│ │ │ -
39public:
│ │ │ -
40 ordering_key_visitor(std::list<KEY>& ordering_in) : ordering_(ordering_in) {}
│ │ │ -
41 template <typename Vertex, typename Graph> void discover_vertex(Vertex v, const Graph& g) const {
│ │ │ -
42 KEY key = boost::get(boost::vertex_name, g, v);
│ │ │ -
43 ordering_.push_front(key);
│ │ │ -
44 }
│ │ │ -
45 std::list<KEY>& ordering_;
│ │ │ -
46};
│ │ │ -
│ │ │ -
47
│ │ │ -
48/* ************************************************************************* */
│ │ │ -
49template<class KEY>
│ │ │ -
│ │ │ -
50std::list<KEY> predecessorMap2Keys(const PredecessorMap<KEY>& p_map) {
│ │ │ -
51
│ │ │ -
52 typedef typename SGraph<KEY>::Vertex SVertex;
│ │ │ -
53
│ │ │ - │ │ │ -
55 SVertex root;
│ │ │ -
56 std::map<KEY, SVertex> key2vertex;
│ │ │ -
57 boost::tie(g, root, key2vertex) = gtsam::predecessorMap2Graph<SGraph<KEY>, SVertex, KEY>(p_map);
│ │ │ -
58
│ │ │ -
59 // breadth first visit on the graph
│ │ │ -
60 std::list<KEY> keys;
│ │ │ - │ │ │ -
62 boost::breadth_first_search(g, root, boost::visitor(vis));
│ │ │ -
63 return keys;
│ │ │ -
64}
│ │ │ -
│ │ │ -
65
│ │ │ -
66/* ************************************************************************* */
│ │ │ -
67template<class G, class F, class KEY>
│ │ │ -
│ │ │ -
68SDGraph<KEY> toBoostGraph(const G& graph) {
│ │ │ -
69 // convert the factor graph to boost graph
│ │ │ - │ │ │ -
71 typedef typename boost::graph_traits<SDGraph<KEY> >::vertex_descriptor BoostVertex;
│ │ │ -
72 std::map<KEY, BoostVertex> key2vertex;
│ │ │ -
73 typename G::const_iterator itFactor;
│ │ │ -
74
│ │ │ -
75 // Loop over the factors
│ │ │ -
76 for(itFactor=graph.begin(); itFactor!=graph.end(); itFactor++) {
│ │ │ -
77
│ │ │ -
78 // Ignore factors that are not binary
│ │ │ -
79 if ((*itFactor)->keys().size() != 2)
│ │ │ -
80 continue;
│ │ │ -
81
│ │ │ -
82 // Cast the factor to the user-specified factor type F
│ │ │ -
83 boost::shared_ptr<F> factor = boost::dynamic_pointer_cast<F>(*itFactor);
│ │ │ -
84 // Ignore factors that are not of type F
│ │ │ -
85 if (!factor) continue;
│ │ │ -
86
│ │ │ -
87 // Retrieve the 2 keys (nodes) the factor (edge) is incident on
│ │ │ -
88 KEY key1 = factor->keys()[0];
│ │ │ -
89 KEY key2 = factor->keys()[1];
│ │ │ -
90
│ │ │ -
91 BoostVertex v1, v2;
│ │ │ -
92
│ │ │ -
93 // If key1 is a new key, add it to the key2vertex map, else get the corresponding vertex id
│ │ │ -
94 if (key2vertex.find(key1) == key2vertex.end()) {
│ │ │ -
95 v1 = add_vertex(key1, g);
│ │ │ -
96 key2vertex.insert(std::pair<KEY,KEY>(key1, v1));
│ │ │ -
97 } else
│ │ │ -
98 v1 = key2vertex[key1];
│ │ │ -
99
│ │ │ -
100 // If key2 is a new key, add it to the key2vertex map, else get the corresponding vertex id
│ │ │ -
101 if (key2vertex.find(key2) == key2vertex.end()) {
│ │ │ -
102 v2 = add_vertex(key2, g);
│ │ │ -
103 key2vertex.insert(std::pair<KEY,KEY>(key2, v2));
│ │ │ -
104 } else
│ │ │ -
105 v2 = key2vertex[key2];
│ │ │ -
106
│ │ │ -
107 // Add an edge with weight 1.0
│ │ │ -
108 boost::property<boost::edge_weight_t, double> edge_property(1.0); // assume constant edge weight here
│ │ │ -
109 boost::add_edge(v1, v2, edge_property, g);
│ │ │ -
110 }
│ │ │ -
111
│ │ │ -
112 return g;
│ │ │ -
113}
│ │ │ +
21#pragma once
│ │ │ +
22
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
26#include <gtsam/base/timing.h>
│ │ │ +
27
│ │ │ +
28#include <boost/optional.hpp>
│ │ │ +
29#include <fstream>
│ │ │ +
30
│ │ │ +
31namespace gtsam {
│ │ │ +
32
│ │ │ +
33 /* ************************************************************************* */
│ │ │ +
34 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
37 for (const sharedClique& root : roots_) getCliqueData(root, &stats);
│ │ │ +
38 return stats;
│ │ │ +
39 }
│ │ │ +
│ │ │ +
40
│ │ │ +
41 /* ************************************************************************* */
│ │ │ +
42 template <class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
44 BayesTreeCliqueData* stats) const {
│ │ │ +
45 const auto conditional = clique->conditional();
│ │ │ +
46 stats->conditionalSizes.push_back(conditional->nrFrontals());
│ │ │ +
47 stats->separatorSizes.push_back(conditional->nrParents());
│ │ │ +
48 for (sharedClique c : clique->children) {
│ │ │ +
49 getCliqueData(c, stats);
│ │ │ +
50 }
│ │ │ +
51 }
│ │ │ +
│ │ │ +
52
│ │ │ +
53 /* ************************************************************************* */
│ │ │ +
54 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
56 size_t count = 0;
│ │ │ +
57 for(const sharedClique& root: roots_)
│ │ │ +
58 count += root->numCachedSeparatorMarginals();
│ │ │ +
59 return count;
│ │ │ +
60 }
│ │ │ +
│ │ │ +
61
│ │ │ +
62 /* ************************************************************************* */
│ │ │ +
63 template <class CLIQUE>
│ │ │ +
│ │ │ +
64 void BayesTree<CLIQUE>::dot(std::ostream& os,
│ │ │ +
65 const KeyFormatter& keyFormatter) const {
│ │ │ +
66 if (roots_.empty())
│ │ │ +
67 throw std::invalid_argument(
│ │ │ +
68 "the root of Bayes tree has not been initialized!");
│ │ │ +
69 os << "digraph G{\n";
│ │ │ +
70 for (const sharedClique& root : roots_) dot(os, root, keyFormatter);
│ │ │ +
71 os << "}";
│ │ │ +
72 std::flush(os);
│ │ │ +
73 }
│ │ │
│ │ │ +
74
│ │ │ +
75 /* ************************************************************************* */
│ │ │ +
76 template <class CLIQUE>
│ │ │ +
│ │ │ +
77 std::string BayesTree<CLIQUE>::dot(const KeyFormatter& keyFormatter) const {
│ │ │ +
78 std::stringstream ss;
│ │ │ +
79 dot(ss, keyFormatter);
│ │ │ +
80 return ss.str();
│ │ │ +
81 }
│ │ │ +
│ │ │ +
82
│ │ │ +
83 /* ************************************************************************* */
│ │ │ +
84 template <class CLIQUE>
│ │ │ +
│ │ │ +
85 void BayesTree<CLIQUE>::saveGraph(const std::string& filename,
│ │ │ +
86 const KeyFormatter& keyFormatter) const {
│ │ │ +
87 std::ofstream of(filename.c_str());
│ │ │ +
88 dot(of, keyFormatter);
│ │ │ +
89 of.close();
│ │ │ +
90 }
│ │ │ +
│ │ │ +
91
│ │ │ +
92 /* ************************************************************************* */
│ │ │ +
93 template <class CLIQUE>
│ │ │ +
│ │ │ +
94 void BayesTree<CLIQUE>::dot(std::ostream& s, sharedClique clique,
│ │ │ +
95 const KeyFormatter& keyFormatter,
│ │ │ +
96 int parentnum) const {
│ │ │ +
97 static int num = 0;
│ │ │ +
98 bool first = true;
│ │ │ +
99 std::stringstream out;
│ │ │ +
100 out << num;
│ │ │ +
101 std::string parent = out.str();
│ │ │ +
102 parent += "[label=\"";
│ │ │ +
103
│ │ │ +
104 for (Key key : clique->conditional_->frontals()) {
│ │ │ +
105 if (!first) parent += ", ";
│ │ │ +
106 first = false;
│ │ │ +
107 parent += keyFormatter(key);
│ │ │ +
108 }
│ │ │ +
109
│ │ │ +
110 if (clique->parent()) {
│ │ │ +
111 parent += " : ";
│ │ │ +
│ │ │ +
112 s << parentnum << "->" << num << "\n";
│ │ │ +
113 }
│ │ │
114
│ │ │ -
115/* ************************************************************************* */
│ │ │ -
116template<class G, class V, class KEY>
│ │ │ -
117boost::tuple<G, V, std::map<KEY,V> >
│ │ │ -
│ │ │ - │ │ │ -
119
│ │ │ -
120 G g;
│ │ │ -
121 std::map<KEY, V> key2vertex;
│ │ │ -
122 V v1, v2, root;
│ │ │ -
123 bool foundRoot = false;
│ │ │ -
124 for(auto child_parent: p_map) {
│ │ │ -
125 KEY child, parent;
│ │ │ -
126 std::tie(child,parent) = child_parent;
│ │ │ -
127 if (key2vertex.find(child) == key2vertex.end()) {
│ │ │ -
128 v1 = add_vertex(child, g);
│ │ │ -
129 key2vertex.insert(std::make_pair(child, v1));
│ │ │ -
130 } else
│ │ │ -
131 v1 = key2vertex[child];
│ │ │ -
132
│ │ │ -
133 if (key2vertex.find(parent) == key2vertex.end()) {
│ │ │ -
134 v2 = add_vertex(parent, g);
│ │ │ -
135 key2vertex.insert(std::make_pair(parent, v2));
│ │ │ -
136 } else
│ │ │ -
137 v2 = key2vertex[parent];
│ │ │ -
138
│ │ │ -
139 if (child==parent) {
│ │ │ -
140 root = v1;
│ │ │ -
141 foundRoot = true;
│ │ │ -
142 } else
│ │ │ -
143 boost::add_edge(v2, v1, g); // edge is from parent to child
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 if (!foundRoot)
│ │ │ -
147 throw std::invalid_argument("predecessorMap2Graph: invalid predecessor map!");
│ │ │ -
148 else
│ │ │ -
149 return boost::tuple<G, V, std::map<KEY, V> >(g, root, key2vertex);
│ │ │ -
150}
│ │ │ -
│ │ │ -
151
│ │ │ -
152/* ************************************************************************* */
│ │ │ -
153template <class V, class POSE, class KEY>
│ │ │ -
│ │ │ -
154class compose_key_visitor : public boost::default_bfs_visitor {
│ │ │ -
155
│ │ │ -
156private:
│ │ │ -
157 boost::shared_ptr<Values> config_;
│ │ │ -
158
│ │ │ -
159public:
│ │ │ -
160
│ │ │ -
161 compose_key_visitor(boost::shared_ptr<Values> config_in) {config_ = config_in;}
│ │ │ -
162
│ │ │ -
163 template <typename Edge, typename Graph> void tree_edge(Edge edge, const Graph& g) const {
│ │ │ -
164 KEY key_from = boost::get(boost::vertex_name, g, boost::source(edge, g));
│ │ │ -
165 KEY key_to = boost::get(boost::vertex_name, g, boost::target(edge, g));
│ │ │ -
166 POSE relativePose = boost::get(boost::edge_weight, g, edge);
│ │ │ -
167 config_->insert(key_to, config_->at<POSE>(key_from).compose(relativePose));
│ │ │ -
168 }
│ │ │ -
169
│ │ │ -
170};
│ │ │ -
│ │ │ -
171
│ │ │ -
172/* ************************************************************************* */
│ │ │ -
173template<class G, class Factor, class POSE, class KEY>
│ │ │ -
│ │ │ -
174boost::shared_ptr<Values> composePoses(const G& graph, const PredecessorMap<KEY>& tree,
│ │ │ -
175 const POSE& rootPose) {
│ │ │ -
176
│ │ │ -
177 //TODO: change edge_weight_t to edge_pose_t
│ │ │ -
178 typedef typename boost::adjacency_list<
│ │ │ -
179 boost::vecS, boost::vecS, boost::directedS,
│ │ │ -
180 boost::property<boost::vertex_name_t, KEY>,
│ │ │ -
181 boost::property<boost::edge_weight_t, POSE> > PoseGraph;
│ │ │ -
182 typedef typename boost::graph_traits<PoseGraph>::vertex_descriptor PoseVertex;
│ │ │ -
183 typedef typename boost::graph_traits<PoseGraph>::edge_descriptor PoseEdge;
│ │ │ -
184
│ │ │ -
185 PoseGraph g;
│ │ │ -
186 PoseVertex root;
│ │ │ -
187 std::map<KEY, PoseVertex> key2vertex;
│ │ │ -
188 boost::tie(g, root, key2vertex) =
│ │ │ -
189 predecessorMap2Graph<PoseGraph, PoseVertex, KEY>(tree);
│ │ │ -
190
│ │ │ -
191 // attach the relative poses to the edges
│ │ │ -
192 PoseEdge edge12, edge21;
│ │ │ -
193 bool found1, found2;
│ │ │ -
194 for(typename G::sharedFactor nl_factor: graph) {
│ │ │ -
195
│ │ │ -
196 if (nl_factor->keys().size() > 2)
│ │ │ -
197 throw std::invalid_argument("composePoses: only support factors with at most two keys");
│ │ │ -
198
│ │ │ -
199 // e.g. in pose2graph, nonlinear factor needs to be converted to pose2factor
│ │ │ -
200 boost::shared_ptr<Factor> factor = boost::dynamic_pointer_cast<Factor>(nl_factor);
│ │ │ -
201 if (!factor) continue;
│ │ │ -
202
│ │ │ -
203 KEY key1 = factor->key1();
│ │ │ -
204 KEY key2 = factor->key2();
│ │ │ -
205
│ │ │ -
206 PoseVertex v1 = key2vertex.find(key1)->second;
│ │ │ -
207 PoseVertex v2 = key2vertex.find(key2)->second;
│ │ │ -
208
│ │ │ -
209 POSE l1Xl2 = factor->measured();
│ │ │ -
210 boost::tie(edge12, found1) = boost::edge(v1, v2, g);
│ │ │ -
211 boost::tie(edge21, found2) = boost::edge(v2, v1, g);
│ │ │ -
212 if (found1 && found2) throw std::invalid_argument ("composePoses: invalid spanning tree");
│ │ │ -
213 if (!found1 && !found2) continue;
│ │ │ -
214 if (found1)
│ │ │ -
215 boost::put(boost::edge_weight, g, edge12, l1Xl2);
│ │ │ -
216 else if (found2)
│ │ │ -
217 boost::put(boost::edge_weight, g, edge21, l1Xl2.inverse());
│ │ │ -
218 }
│ │ │ -
219
│ │ │ -
220 // compose poses
│ │ │ -
221 boost::shared_ptr<Values> config(new Values);
│ │ │ -
222 KEY rootKey = boost::get(boost::vertex_name, g, root);
│ │ │ -
223 config->insert(rootKey, rootPose);
│ │ │ - │ │ │ -
225 boost::breadth_first_search(g, root, boost::visitor(vis));
│ │ │ -
226
│ │ │ -
227 return config;
│ │ │ -
228}
│ │ │ -
│ │ │ -
229
│ │ │ -
230/* ************************************************************************* */
│ │ │ -
231template<class G, class KEY, class FACTOR2>
│ │ │ -
│ │ │ - │ │ │ -
233
│ │ │ -
234 // Convert to a graph that boost understands
│ │ │ -
235 SDGraph<KEY> g = gtsam::toBoostGraph<G, FACTOR2, KEY>(fg);
│ │ │ -
236
│ │ │ -
237 // find minimum spanning tree
│ │ │ -
238 std::vector<typename SDGraph<KEY>::Vertex> p_map(boost::num_vertices(g));
│ │ │ -
239 prim_minimum_spanning_tree(g, &p_map[0]);
│ │ │ -
240
│ │ │ -
241 // convert edge to string pairs
│ │ │ - │ │ │ -
243 typename SDGraph<KEY>::vertex_iterator itVertex = boost::vertices(g).first;
│ │ │ -
244 for(const typename SDGraph<KEY>::Vertex& vi: p_map){
│ │ │ -
245 KEY key = boost::get(boost::vertex_name, g, *itVertex);
│ │ │ -
246 KEY parent = boost::get(boost::vertex_name, g, vi);
│ │ │ -
247 tree.insert(key, parent);
│ │ │ -
248 itVertex++;
│ │ │ -
249 }
│ │ │ -
250 return tree;
│ │ │ -
251}
│ │ │ -
│ │ │ -
252
│ │ │ -
253/* ************************************************************************* */
│ │ │ -
254template<class G, class KEY, class FACTOR2>
│ │ │ -
│ │ │ -
255void split(const G& g, const PredecessorMap<KEY>& tree, G& Ab1, G& Ab2) {
│ │ │ -
256
│ │ │ -
257 typedef typename G::sharedFactor F ;
│ │ │ -
258
│ │ │ -
259 for(const F& factor: g)
│ │ │ -
260 {
│ │ │ -
261 if (factor->keys().size() > 2)
│ │ │ -
262 throw(std::invalid_argument("split: only support factors with at most two keys"));
│ │ │ -
263
│ │ │ -
264 if (factor->keys().size() == 1) {
│ │ │ -
265 Ab1.push_back(factor);
│ │ │ -
266 continue;
│ │ │ -
267 }
│ │ │ -
268
│ │ │ -
269 boost::shared_ptr<FACTOR2> factor2 = boost::dynamic_pointer_cast<
│ │ │ -
270 FACTOR2>(factor);
│ │ │ -
271 if (!factor2) continue;
│ │ │ -
272
│ │ │ -
273 KEY key1 = factor2->key1();
│ │ │ -
274 KEY key2 = factor2->key2();
│ │ │ -
275 // if the tree contains the key
│ │ │ -
276 if ((tree.find(key1) != tree.end() &&
│ │ │ -
277 tree.find(key1)->second.compare(key2) == 0) ||
│ │ │ -
278 (tree.find(key2) != tree.end() &&
│ │ │ -
279 tree.find(key2)->second.compare(key1)== 0) )
│ │ │ -
280 Ab1.push_back(factor2);
│ │ │ -
281 else
│ │ │ -
282 Ab2.push_back(factor2);
│ │ │ -
283 }
│ │ │ -
284}
│ │ │ -
│ │ │ -
285
│ │ │ -
286}
│ │ │ -
Graph algorithm using boost library.
│ │ │ +
115 first = true;
│ │ │ +
116 for (Key parentKey : clique->conditional_->parents()) {
│ │ │ +
│ │ │ +
117 if (!first) parent += ", ";
│ │ │ +
118 first = false;
│ │ │ +
119 parent += keyFormatter(parentKey);
│ │ │ +
120 }
│ │ │ +
121 parent += "\"];\n";
│ │ │ +
122 s << parent;
│ │ │ +
│ │ │ +
123 parentnum = num;
│ │ │ +
124
│ │ │ +
125 for (sharedClique c : clique->children) {
│ │ │ +
126 num++;
│ │ │ +
│ │ │ +
127 dot(s, c, keyFormatter, parentnum);
│ │ │ +
128 }
│ │ │ +
129 }
│ │ │ +
130
│ │ │ +
131 /* ************************************************************************* */
│ │ │ +
132 template<class CLIQUE>
│ │ │ +
│ │ │ +
133 size_t BayesTree<CLIQUE>::size() const {
│ │ │ +
134 size_t size = 0;
│ │ │ +
│ │ │ +
135 for(const sharedClique& clique: roots_)
│ │ │ +
136 size += clique->treeSize();
│ │ │ +
137 return size;
│ │ │ +
138 }
│ │ │ +
│ │ │ +
│ │ │ +
139
│ │ │ +
140 /* ************************************************************************* */
│ │ │ +
141 template<class CLIQUE>
│ │ │ +
│ │ │ +
142 void BayesTree<CLIQUE>::addClique(const sharedClique& clique, const sharedClique& parent_clique) {
│ │ │ +
143 for(Key j: clique->conditional()->frontals())
│ │ │ +
144 nodes_[j] = clique;
│ │ │ +
145 if (parent_clique != nullptr) {
│ │ │ +
146 clique->parent_ = parent_clique;
│ │ │ +
147 parent_clique->children.push_back(clique);
│ │ │ +
148 } else {
│ │ │ +
149 roots_.push_back(clique);
│ │ │ +
150 }
│ │ │ +
151 }
│ │ │ +
│ │ │ +
152
│ │ │ +
153 /* ************************************************************************* */
│ │ │ +
154 namespace {
│ │ │ +
155 template <class FACTOR, class CLIQUE>
│ │ │ +
156 struct _pushCliqueFunctor {
│ │ │ +
157 _pushCliqueFunctor(FactorGraph<FACTOR>* graph_) : graph(graph_) {}
│ │ │ +
158 FactorGraph<FACTOR>* graph;
│ │ │ +
159 int operator()(const boost::shared_ptr<CLIQUE>& clique, int dummy) {
│ │ │ +
160 graph->push_back(clique->conditional_);
│ │ │ +
│ │ │ +
161 return 0;
│ │ │ +
162 }
│ │ │ +
163 };
│ │ │ +
│ │ │ +
164 } // namespace
│ │ │ +
165
│ │ │ +
166 /* ************************************************************************* */
│ │ │ +
167 template <class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
169 FactorGraph<FactorType>* graph) const {
│ │ │ +
170 // Traverse the BayesTree and add all conditionals to this graph
│ │ │ +
│ │ │ +
171 int data = 0; // Unused
│ │ │ +
172 _pushCliqueFunctor<FactorType, CLIQUE> functor(graph);
│ │ │ +
173 treeTraversal::DepthFirstForest(*this, data, functor);
│ │ │ +
174 }
│ │ │ +
175
│ │ │ +
176 /* ************************************************************************* */
│ │ │ +
│ │ │ +
177 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
179 *this = other;
│ │ │ +
180 }
│ │ │ +
│ │ │ +
181
│ │ │ +
182 /* ************************************************************************* */
│ │ │ +
│ │ │ +
183 namespace {
│ │ │ +
184 template<typename NODE>
│ │ │ +
185 boost::shared_ptr<NODE>
│ │ │ +
186 BayesTreeCloneForestVisitorPre(const boost::shared_ptr<NODE>& node, const boost::shared_ptr<NODE>& parentPointer)
│ │ │ +
187 {
│ │ │ +
188 // Clone the current node and add it to its cloned parent
│ │ │ +
│ │ │ +
189 boost::shared_ptr<NODE> clone = boost::make_shared<NODE>(*node);
│ │ │ +
190 clone->children.clear();
│ │ │ +
191 clone->parent_ = parentPointer;
│ │ │ +
│ │ │ +
192 parentPointer->children.push_back(clone);
│ │ │ +
193 return clone;
│ │ │ +
194 }
│ │ │ +
195 }
│ │ │ +
│ │ │ + │ │ │ +
197 /* ************************************************************************* */
│ │ │ +
198 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
200 this->clear();
│ │ │ +
201 boost::shared_ptr<Clique> rootContainer = boost::make_shared<Clique>();
│ │ │ +
202 treeTraversal::DepthFirstForest(other, rootContainer, BayesTreeCloneForestVisitorPre<Clique>);
│ │ │ +
203 for(const sharedClique& root: rootContainer->children) {
│ │ │ +
204 root->parent_ = typename Clique::weak_ptr(); // Reset the parent since it's set to the dummy clique
│ │ │ +
205 insertRoot(root);
│ │ │ +
206 }
│ │ │ +
207 return *this;
│ │ │ + │ │ │ +
│ │ │ +
209
│ │ │ +
210 /* ************************************************************************* */
│ │ │ +
│ │ │ +
211 template<class CLIQUE>
│ │ │ +
│ │ │ +
212 void BayesTree<CLIQUE>::print(const std::string& s, const KeyFormatter& keyFormatter) const {
│ │ │ +
213 std::cout << s << ": cliques: " << size() << ", variables: " << nodes_.size() << std::endl;
│ │ │ +
│ │ │ +
214 treeTraversal::PrintForest(*this, s, keyFormatter);
│ │ │ +
215 }
│ │ │ +
216
│ │ │ +
217 /* ************************************************************************* */
│ │ │ +
218 // binary predicate to test equality of a pair for use in equals
│ │ │ +
219 template<class CLIQUE>
│ │ │ +
│ │ │ +
220 bool check_sharedCliques(
│ │ │ +
221 const std::pair<Key, typename BayesTree<CLIQUE>::sharedClique>& v1,
│ │ │ +
222 const std::pair<Key, typename BayesTree<CLIQUE>::sharedClique>& v2
│ │ │ +
223 ) {
│ │ │ +
224 return v1.first == v2.first &&
│ │ │ +
225 ((!v1.second && !v2.second) || (v1.second && v2.second && v1.second->equals(*v2.second)));
│ │ │ +
│ │ │ + │ │ │ +
227
│ │ │ +
228 /* ************************************************************************* */
│ │ │ +
229 template<class CLIQUE>
│ │ │ +
│ │ │ +
230 bool BayesTree<CLIQUE>::equals(const BayesTree<CLIQUE>& other, double tol) const {
│ │ │ +
231 return size()==other.size() &&
│ │ │ +
232 std::equal(nodes_.begin(), nodes_.end(), other.nodes_.begin(), &check_sharedCliques<CLIQUE>);
│ │ │ +
233 }
│ │ │ +
│ │ │ +
234
│ │ │ +
│ │ │ +
235 /* ************************************************************************* */
│ │ │ +
236 template<class CLIQUE>
│ │ │ +
237 template<class CONTAINER>
│ │ │ +
│ │ │ +
238 Key BayesTree<CLIQUE>::findParentClique(const CONTAINER& parents) const {
│ │ │ +
239 typename CONTAINER::const_iterator lowestOrderedParent = min_element(parents.begin(), parents.end());
│ │ │ +
240 assert(lowestOrderedParent != parents.end());
│ │ │ +
│ │ │ +
241 return *lowestOrderedParent;
│ │ │ +
242 }
│ │ │ +
243
│ │ │ +
244 /* ************************************************************************* */
│ │ │ +
245 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
247 // Add each frontal variable of this root node
│ │ │ +
248 for(const Key& j: subtree->conditional()->frontals()) {
│ │ │ +
249 bool inserted = nodes_.insert(std::make_pair(j, subtree)).second;
│ │ │ +
│ │ │ +
250 assert(inserted); (void)inserted;
│ │ │ +
251 }
│ │ │ +
252 // Fill index for each child
│ │ │ +
│ │ │ + │ │ │ +
254 for(const sharedClique& child: subtree->children) {
│ │ │ +
255 fillNodesIndex(child); }
│ │ │ + │ │ │ +
257
│ │ │ +
258 /* ************************************************************************* */
│ │ │ +
259 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
261 roots_.push_back(subtree); // Add to roots
│ │ │ +
262 fillNodesIndex(subtree); // Populate nodes index
│ │ │ +
263 }
│ │ │ +
│ │ │ +
264
│ │ │ +
265 /* ************************************************************************* */
│ │ │ +
266 // First finds clique marginal then marginalizes that
│ │ │ +
267 /* ************************************************************************* */
│ │ │ +
268 template<class CLIQUE>
│ │ │ +
269 typename BayesTree<CLIQUE>::sharedConditional
│ │ │ +
│ │ │ +
270 BayesTree<CLIQUE>::marginalFactor(Key j, const Eliminate& function) const
│ │ │ +
271 {
│ │ │ +
272 gttic(BayesTree_marginalFactor);
│ │ │ +
273
│ │ │ +
274 // get clique containing Key j
│ │ │ +
275 sharedClique clique = this->clique(j);
│ │ │ +
276
│ │ │ +
277 // calculate or retrieve its marginal P(C) = P(F,S)
│ │ │ +
278 FactorGraphType cliqueMarginal = clique->marginal2(function);
│ │ │ +
279
│ │ │ +
280 // Now, marginalize out everything that is not variable j
│ │ │ +
281 BayesNetType marginalBN =
│ │ │ +
282 *cliqueMarginal.marginalMultifrontalBayesNet(Ordering{j}, function);
│ │ │ +
283
│ │ │ +
284 // The Bayes net should contain only one conditional for variable j, so return it
│ │ │ +
285 return marginalBN.front();
│ │ │ +
286 }
│ │ │ +
│ │ │ +
287
│ │ │ +
288 /* ************************************************************************* */
│ │ │ +
289 // Find two cliques, their joint, then marginalizes
│ │ │ +
290 /* ************************************************************************* */
│ │ │ +
291 template<class CLIQUE>
│ │ │ +
292 typename BayesTree<CLIQUE>::sharedFactorGraph
│ │ │ +
│ │ │ +
293 BayesTree<CLIQUE>::joint(Key j1, Key j2, const Eliminate& function) const
│ │ │ +
294 {
│ │ │ +
295 gttic(BayesTree_joint);
│ │ │ +
296 return boost::make_shared<FactorGraphType>(*jointBayesNet(j1, j2, function));
│ │ │ +
297 }
│ │ │ +
│ │ │ +
298
│ │ │ +
299 /* ************************************************************************* */
│ │ │ +
300 template<class CLIQUE>
│ │ │ +
301 typename BayesTree<CLIQUE>::sharedBayesNet
│ │ │ +
│ │ │ +
302 BayesTree<CLIQUE>::jointBayesNet(Key j1, Key j2, const Eliminate& function) const
│ │ │ +
303 {
│ │ │ +
304 gttic(BayesTree_jointBayesNet);
│ │ │ +
305 // get clique C1 and C2
│ │ │ +
306 sharedClique C1 = (*this)[j1], C2 = (*this)[j2];
│ │ │ +
307
│ │ │ +
308 gttic(Lowest_common_ancestor);
│ │ │ +
309 // Find lowest common ancestor clique
│ │ │ +
310 sharedClique B; {
│ │ │ +
311 // Build two paths to the root
│ │ │ +
312 FastList<sharedClique> path1, path2; {
│ │ │ +
313 sharedClique p = C1;
│ │ │ +
314 while(p) {
│ │ │ +
315 path1.push_front(p);
│ │ │ +
316 p = p->parent();
│ │ │ +
317 }
│ │ │ +
318 } {
│ │ │ +
319 sharedClique p = C2;
│ │ │ +
320 while(p) {
│ │ │ +
321 path2.push_front(p);
│ │ │ +
322 p = p->parent();
│ │ │ +
323 }
│ │ │ +
324 }
│ │ │ +
325 // Find the path intersection
│ │ │ +
326 typename FastList<sharedClique>::const_iterator p1 = path1.begin(), p2 = path2.begin();
│ │ │ +
327 if(*p1 == *p2)
│ │ │ +
328 B = *p1;
│ │ │ +
329 while(p1 != path1.end() && p2 != path2.end() && *p1 == *p2) {
│ │ │ +
330 B = *p1;
│ │ │ +
331 ++p1;
│ │ │ +
332 ++p2;
│ │ │ +
333 }
│ │ │ +
334 }
│ │ │ +
335 gttoc(Lowest_common_ancestor);
│ │ │ +
336
│ │ │ +
337 // Build joint on all involved variables
│ │ │ +
338 FactorGraphType p_BC1C2;
│ │ │ +
339
│ │ │ +
340 if(B)
│ │ │ +
341 {
│ │ │ +
342 // Compute marginal on lowest common ancestor clique
│ │ │ +
343 gttic(LCA_marginal);
│ │ │ +
344 FactorGraphType p_B = B->marginal2(function);
│ │ │ +
345 gttoc(LCA_marginal);
│ │ │ +
346
│ │ │ +
347 // Compute shortcuts of the requested cliques given the lowest common ancestor
│ │ │ +
348 gttic(Clique_shortcuts);
│ │ │ +
349 BayesNetType p_C1_Bred = C1->shortcut(B, function);
│ │ │ +
350 BayesNetType p_C2_Bred = C2->shortcut(B, function);
│ │ │ +
351 gttoc(Clique_shortcuts);
│ │ │ +
352
│ │ │ +
353 // Factor the shortcuts to be conditioned on the full root
│ │ │ +
354 // Get the set of variables to eliminate, which is C1\B.
│ │ │ +
355 gttic(Full_root_factoring);
│ │ │ +
356 boost::shared_ptr<typename EliminationTraitsType::BayesTreeType> p_C1_B; {
│ │ │ +
357 KeyVector C1_minus_B; {
│ │ │ +
358 KeySet C1_minus_B_set(C1->conditional()->beginParents(), C1->conditional()->endParents());
│ │ │ +
359 for(const Key j: *B->conditional()) {
│ │ │ +
360 C1_minus_B_set.erase(j); }
│ │ │ +
361 C1_minus_B.assign(C1_minus_B_set.begin(), C1_minus_B_set.end());
│ │ │ +
362 }
│ │ │ +
363 // Factor into C1\B | B.
│ │ │ +
364 sharedFactorGraph temp_remaining;
│ │ │ +
365 boost::tie(p_C1_B, temp_remaining) =
│ │ │ +
366 FactorGraphType(p_C1_Bred).eliminatePartialMultifrontal(Ordering(C1_minus_B), function);
│ │ │ +
367 }
│ │ │ +
368 boost::shared_ptr<typename EliminationTraitsType::BayesTreeType> p_C2_B; {
│ │ │ +
369 KeyVector C2_minus_B; {
│ │ │ +
370 KeySet C2_minus_B_set(C2->conditional()->beginParents(), C2->conditional()->endParents());
│ │ │ +
371 for(const Key j: *B->conditional()) {
│ │ │ +
372 C2_minus_B_set.erase(j); }
│ │ │ +
373 C2_minus_B.assign(C2_minus_B_set.begin(), C2_minus_B_set.end());
│ │ │ +
374 }
│ │ │ +
375 // Factor into C2\B | B.
│ │ │ +
376 sharedFactorGraph temp_remaining;
│ │ │ +
377 boost::tie(p_C2_B, temp_remaining) =
│ │ │ +
378 FactorGraphType(p_C2_Bred).eliminatePartialMultifrontal(Ordering(C2_minus_B), function);
│ │ │ +
379 }
│ │ │ +
380 gttoc(Full_root_factoring);
│ │ │ +
381
│ │ │ +
382 gttic(Variable_joint);
│ │ │ +
383 p_BC1C2 += p_B;
│ │ │ +
384 p_BC1C2 += *p_C1_B;
│ │ │ +
385 p_BC1C2 += *p_C2_B;
│ │ │ +
386 if(C1 != B)
│ │ │ +
387 p_BC1C2 += C1->conditional();
│ │ │ +
388 if(C2 != B)
│ │ │ +
389 p_BC1C2 += C2->conditional();
│ │ │ +
390 gttoc(Variable_joint);
│ │ │ +
391 }
│ │ │ +
392 else
│ │ │ +
393 {
│ │ │ +
394 // The nodes have no common ancestor, they're in different trees, so they're joint is just the
│ │ │ +
395 // product of their marginals.
│ │ │ +
396 gttic(Disjoint_marginals);
│ │ │ +
397 p_BC1C2 += C1->marginal2(function);
│ │ │ +
398 p_BC1C2 += C2->marginal2(function);
│ │ │ +
399 gttoc(Disjoint_marginals);
│ │ │ +
400 }
│ │ │ +
401
│ │ │ +
402 // now, marginalize out everything that is not variable j1 or j2
│ │ │ +
403 return p_BC1C2.marginalMultifrontalBayesNet(Ordering{j1, j2}, function);
│ │ │ +
404 }
│ │ │ +
│ │ │ +
405
│ │ │ +
406 /* ************************************************************************* */
│ │ │ +
407 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
409 // Remove all nodes and clear the root pointer
│ │ │ +
410 nodes_.clear();
│ │ │ +
411 roots_.clear();
│ │ │ +
412 }
│ │ │ +
│ │ │ +
413
│ │ │ +
414 /* ************************************************************************* */
│ │ │ +
415 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
417 for(const sharedClique& root: roots_) {
│ │ │ +
418 root->deleteCachedShortcuts();
│ │ │ +
419 }
│ │ │ +
420 }
│ │ │ +
│ │ │ +
421
│ │ │ +
422 /* ************************************************************************* */
│ │ │ +
423 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
425 {
│ │ │ +
426 if (clique->isRoot()) {
│ │ │ +
427 typename Roots::iterator root = std::find(roots_.begin(), roots_.end(), clique);
│ │ │ +
428 if(root != roots_.end())
│ │ │ +
429 roots_.erase(root);
│ │ │ +
430 } else { // detach clique from parent
│ │ │ +
431 sharedClique parent = clique->parent_.lock();
│ │ │ +
432 typename Roots::iterator child = std::find(parent->children.begin(), parent->children.end(), clique);
│ │ │ +
433 assert(child != parent->children.end());
│ │ │ +
434 parent->children.erase(child);
│ │ │ +
435 }
│ │ │ +
436
│ │ │ +
437 // orphan my children
│ │ │ +
438 for(sharedClique child: clique->children)
│ │ │ +
439 child->parent_ = typename Clique::weak_ptr();
│ │ │ +
440
│ │ │ +
441 for(Key j: clique->conditional()->frontals()) {
│ │ │ +
442 nodes_.unsafe_erase(j);
│ │ │ +
443 }
│ │ │ +
444 }
│ │ │ +
│ │ │ +
│ │ │ +
445
│ │ │ +
446 /* ************************************************************************* */
│ │ │ +
447 template <class CLIQUE>
│ │ │ +
│ │ │ +
448 void BayesTree<CLIQUE>::removePath(sharedClique clique, BayesNetType* bn,
│ │ │ +
449 Cliques* orphans) {
│ │ │ +
450 // base case is nullptr, if so we do nothing and return empties above
│ │ │ +
451 if (clique) {
│ │ │ +
452 // remove the clique from orphans in case it has been added earlier
│ │ │ +
453 orphans->remove(clique);
│ │ │ +
454
│ │ │ +
455 // remove me
│ │ │ +
456 this->removeClique(clique);
│ │ │ +
457
│ │ │ +
458 // remove path above me
│ │ │ +
459 this->removePath(typename Clique::shared_ptr(clique->parent_.lock()), bn,
│ │ │ +
460 orphans);
│ │ │ +
461
│ │ │ +
462 // add children to list of orphans (splice also removed them from
│ │ │ +
463 // clique->children_)
│ │ │ +
464 orphans->insert(orphans->begin(), clique->children.begin(),
│ │ │ +
465 clique->children.end());
│ │ │ +
466 clique->children.clear();
│ │ │ +
467
│ │ │ +
468 bn->push_back(clique->conditional_);
│ │ │ +
469 }
│ │ │ +
470 }
│ │ │ +
│ │ │ +
471
│ │ │ +
472 /* *************************************************************************
│ │ │ +
473 */
│ │ │ +
474 template <class CLIQUE>
│ │ │ +
│ │ │ +
475 void BayesTree<CLIQUE>::removeTop(const KeyVector& keys, BayesNetType* bn,
│ │ │ +
476 Cliques* orphans) {
│ │ │ +
477 gttic(removetop);
│ │ │ +
478 // process each key of the new factor
│ │ │ +
479 for (const Key& j : keys) {
│ │ │ +
480 // get the clique
│ │ │ +
481 // TODO(frank): Nodes will be searched again in removeClique
│ │ │ +
482 typename Nodes::const_iterator node = nodes_.find(j);
│ │ │ +
483 if (node != nodes_.end()) {
│ │ │ +
484 // remove path from clique to root
│ │ │ +
485 this->removePath(node->second, bn, orphans);
│ │ │ +
486 }
│ │ │ +
487 }
│ │ │ +
488
│ │ │ +
489 // Delete cachedShortcuts for each orphan subtree
│ │ │ +
490 // TODO(frank): Consider Improving
│ │ │ +
491 for (sharedClique& orphan : *orphans) orphan->deleteCachedShortcuts();
│ │ │ +
492 }
│ │ │ +
│ │ │ +
493
│ │ │ +
494 /* ************************************************************************* */
│ │ │ +
495 template<class CLIQUE>
│ │ │ +
│ │ │ + │ │ │ +
497 const sharedClique& subtree)
│ │ │ +
498 {
│ │ │ +
499 // Result clique list
│ │ │ +
500 Cliques cliques;
│ │ │ +
501 cliques.push_back(subtree);
│ │ │ +
502
│ │ │ +
503 // Remove the first clique from its parents
│ │ │ +
504 if(!subtree->isRoot())
│ │ │ +
505 subtree->parent()->children.erase(std::find(
│ │ │ +
506 subtree->parent()->children.begin(), subtree->parent()->children.end(), subtree));
│ │ │ +
507 else
│ │ │ +
508 roots_.erase(std::find(roots_.begin(), roots_.end(), subtree));
│ │ │ +
509
│ │ │ +
510 // Add all subtree cliques and erase the children and parent of each
│ │ │ +
511 for(typename Cliques::iterator clique = cliques.begin(); clique != cliques.end(); ++clique)
│ │ │ +
512 {
│ │ │ +
513 // Add children
│ │ │ +
514 for(const sharedClique& child: (*clique)->children) {
│ │ │ +
515 cliques.push_back(child); }
│ │ │ +
516
│ │ │ +
517 // Delete cached shortcuts
│ │ │ +
518 (*clique)->deleteCachedShortcutsNonRecursive();
│ │ │ +
519
│ │ │ +
520 // Remove this node from the nodes index
│ │ │ +
521 for(Key j: (*clique)->conditional()->frontals()) {
│ │ │ +
522 nodes_.unsafe_erase(j); }
│ │ │ +
523
│ │ │ +
524 // Erase the parent and children pointers
│ │ │ +
525 (*clique)->parent_.reset();
│ │ │ +
526 (*clique)->children.clear();
│ │ │ +
527 }
│ │ │ +
528
│ │ │ +
529 return cliques;
│ │ │ +
530 }
│ │ │ +
│ │ │ +
531
│ │ │ +
532}
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
Timing utilities.
│ │ │ + │ │ │ +
Bayes Tree is a tree of cliques of a Bayes Chain.
│ │ │ +
Variable ordering for the elimination algorithm.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
std::list< KEY > predecessorMap2Keys(const PredecessorMap< KEY > &p_map)
Generate a list of keys from a spanning tree represented by its predecessor map.
Definition graph-inl.h:50
│ │ │ -
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
│ │ │ -
boost::shared_ptr< Values > composePoses(const G &graph, const PredecessorMap< KEY > &tree, const POSE &rootPose)
Compose the poses by following the chain specified by the spanning tree.
Definition graph-inl.h:174
│ │ │ -
SDGraph< KEY > toBoostGraph(const G &graph)
Convert the factor graph to an SDGraph G = Graph type F = Factor type Key = Key type.
Definition graph-inl.h:68
│ │ │ -
PredecessorMap< KEY > findMinimumSpanningTree(const G &fg)
find the minimum spanning tree using boost graph library
Definition graph-inl.h:232
│ │ │ -
boost::tuple< G, V, std::map< KEY, V > > predecessorMap2Graph(const PredecessorMap< KEY > &p_map)
Build takes a predecessor map, and builds a directed graph corresponding to the tree.
Definition graph-inl.h:118
│ │ │ -
Definition graph-inl.h:38
│ │ │ -
Definition graph-inl.h:154
│ │ │ -
SDGraph is undirected graph with variable keys and double edge weights.
Definition graph.h:40
│ │ │ -
Definition graph.h:47
│ │ │ -
Map from variable key to parent key.
Definition graph.h:58
│ │ │ -
void insert(const KEY &key, const KEY &parent)
convenience insert so we can pass ints for TypedSymbol keys
Definition graph.h:61
│ │ │ -
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65
│ │ │ +
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │ +
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
│ │ │ +
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
│ │ │ +
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
│ │ │ +
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the de...
Definition FastList.h:40
│ │ │ + │ │ │ +
A factor graph is a bipartite graph with factor nodes connected to variable nodes.
Definition FactorGraph.h:97
│ │ │ +
store all the sizes
Definition BayesTree.h:48
│ │ │ +
Bayes tree.
Definition BayesTree.h:67
│ │ │ +
Nodes nodes_
Map from indices to Clique.
Definition BayesTree.h:100
│ │ │ +
void removeClique(sharedClique clique)
remove a clique: warning, can result in a forest
Definition BayesTree-inst.h:424
│ │ │ +
sharedFactorGraph joint(Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
return joint on two variables Limitation: can only calculate joint if cliques are disjoint or one of ...
Definition BayesTree-inst.h:293
│ │ │ +
void fillNodesIndex(const sharedClique &subtree)
Fill the nodes index for a subtree.
Definition BayesTree-inst.h:246
│ │ │ +
void dot(std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Output to graphviz format, stream version.
Definition BayesTree-inst.h:64
│ │ │ +
void addFactorsToGraph(FactorGraph< FactorType > *graph) const
Add all cliques in this BayesTree to the specified factor graph.
Definition BayesTree-inst.h:168
│ │ │ +
bool equals(const This &other, double tol=1e-9) const
check equality
Definition BayesTree-inst.h:230
│ │ │ +
This & operator=(const This &other)
Assignment operator.
Definition BayesTree-inst.h:199
│ │ │ +
boost::shared_ptr< Clique > sharedClique
Shared pointer to a clique.
Definition BayesTree.h:74
│ │ │ +
BayesTree()
Create an empty Bayes Tree.
Definition BayesTree.h:109
│ │ │ +
void clear()
Remove all nodes.
Definition BayesTree-inst.h:408
│ │ │ +
void addClique(const sharedClique &clique, const sharedClique &parent_clique=sharedClique())
add a clique (top down)
Definition BayesTree-inst.h:142
│ │ │ +
sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
return joint on two variables as a BayesNet Limitation: can only calculate joint if cliques are disjo...
Definition BayesTree-inst.h:302
│ │ │ +
Key findParentClique(const CONTAINER &parents) const
Find parent clique of a conditional.
Definition BayesTree-inst.h:238
│ │ │ +
size_t size() const
number of cliques
Definition BayesTree-inst.h:133
│ │ │ +
void deleteCachedShortcuts()
Clear all shortcut caches - use before timing on marginal calculation to avoid residual cache data.
Definition BayesTree-inst.h:416
│ │ │ +
void removePath(sharedClique clique, BayesNetType *bn, Cliques *orphans)
Remove path from clique to root and return that path as factors plus a list of orphaned subtree roots...
Definition BayesTree-inst.h:448
│ │ │ +
sharedConditional marginalFactor(Key j, const Eliminate &function=EliminationTraitsType::DefaultEliminate) const
Return marginal on any variable.
Definition BayesTree-inst.h:270
│ │ │ +
size_t numCachedSeparatorMarginals() const
Collect number of cliques with cached separator marginals.
Definition BayesTree-inst.h:55
│ │ │ +
BayesTreeCliqueData getCliqueData() const
Gather data on all cliques.
Definition BayesTree-inst.h:35
│ │ │ +
Cliques removeSubtree(const sharedClique &subtree)
Remove the requested subtree.
Definition BayesTree-inst.h:496
│ │ │ +
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
print
Definition BayesTree-inst.h:212
│ │ │ +
void insertRoot(const sharedClique &subtree)
Insert a new subtree with known parent clique.
Definition BayesTree-inst.h:260
│ │ │ +
void saveGraph(const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
output to file with graphviz format.
Definition BayesTree-inst.h:85
│ │ │ +
void removeTop(const KeyVector &keys, BayesNetType *bn, Cliques *orphans)
Given a list of indices, turn "contaminated" part of the tree back into a factor graph.
Definition BayesTree-inst.h:475
│ │ │ +
Definition Ordering.h:34
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,377 +1,757 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -graph-inl.h │ │ │ │ +BayesTree-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 graph-inl.h │ │ │ │ -14 * @brief Graph algorithm using boost library │ │ │ │ -15 * @author Kai Ni │ │ │ │ -16 */ │ │ │ │ -17 │ │ │ │ -18#pragma once │ │ │ │ -19 │ │ │ │ -20#include │ │ │ │ -21#ifdef __GNUC__ │ │ │ │ -22#pragma GCC diagnostic push │ │ │ │ -23#pragma GCC diagnostic ignored "-Wunused-variable" │ │ │ │ -24//#pragma GCC diagnostic ignored "-Wunneeded-internal-declaration" │ │ │ │ -25#endif │ │ │ │ -26#include │ │ │ │ -27#ifdef __GNUC__ │ │ │ │ -28#pragma GCC diagnostic pop │ │ │ │ -29#endif │ │ │ │ -30#include │ │ │ │ -31 │ │ │ │ -32#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_g_r_a_p_h_._h> │ │ │ │ -33 │ │ │ │ -34namespace _g_t_s_a_m { │ │ │ │ -35 │ │ │ │ -36/* ************************************************************************* │ │ │ │ +21#pragma once │ │ │ │ +22 │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_O_r_d_e_r_i_n_g_._h> │ │ │ │ +24#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> │ │ │ │ +25#include <_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> │ │ │ │ +26#include <_g_t_s_a_m_/_b_a_s_e_/_t_i_m_i_n_g_._h> │ │ │ │ +27 │ │ │ │ +28#include │ │ │ │ +29#include │ │ │ │ +30 │ │ │ │ +31namespace _g_t_s_a_m { │ │ │ │ +32 │ │ │ │ +33 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -37template │ │ │ │ -_3_8class _o_r_d_e_r_i_n_g___k_e_y___v_i_s_i_t_o_r : public boost::default_bfs_visitor { │ │ │ │ -39public: │ │ │ │ -40 _o_r_d_e_r_i_n_g___k_e_y___v_i_s_i_t_o_r(std::list& ordering_in) : ordering_(ordering_in) │ │ │ │ -{} │ │ │ │ -41 template void discover_vertex(Vertex v, │ │ │ │ -const Graph& g) const { │ │ │ │ -42 KEY key = boost::get(boost::vertex_name, g, v); │ │ │ │ -43 ordering_.push_front(key); │ │ │ │ -44 } │ │ │ │ -45 std::list& ordering_; │ │ │ │ -46}; │ │ │ │ -47 │ │ │ │ -48/* ************************************************************************* │ │ │ │ +34 template │ │ │ │ +_3_5 _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_g_e_t_C_l_i_q_u_e_D_a_t_a() const { │ │ │ │ +36 _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a stats; │ │ │ │ +37 for (const _s_h_a_r_e_d_C_l_i_q_u_e& root : roots_) getCliqueData(root, &stats); │ │ │ │ +38 return stats; │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +41 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -49template │ │ │ │ -_5_0std::list _p_r_e_d_e_c_e_s_s_o_r_M_a_p_2_K_e_y_s(const _P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_>& p_map) { │ │ │ │ -51 │ │ │ │ -52 typedef typename SGraph::Vertex SVertex; │ │ │ │ -53 │ │ │ │ -54 _S_G_r_a_p_h_<_K_E_Y_> g; │ │ │ │ -55 SVertex root; │ │ │ │ -56 std::map key2vertex; │ │ │ │ -57 boost::tie(g, root, key2vertex) = gtsam::predecessorMap2Graph, │ │ │ │ -SVertex, KEY>(p_map); │ │ │ │ -58 │ │ │ │ -59 // breadth first visit on the graph │ │ │ │ -60 std::list keys; │ │ │ │ -61 _o_r_d_e_r_i_n_g___k_e_y___v_i_s_i_t_o_r_<_K_E_Y_> vis(keys); │ │ │ │ -62 boost::breadth_first_search(g, root, boost::visitor(vis)); │ │ │ │ -63 return keys; │ │ │ │ -64} │ │ │ │ -65 │ │ │ │ -66/* ************************************************************************* │ │ │ │ +42 template │ │ │ │ +_4_3 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_g_e_t_C_l_i_q_u_e_D_a_t_a(_s_h_a_r_e_d_C_l_i_q_u_e clique, │ │ │ │ +44 _B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a* stats) const { │ │ │ │ +45 const auto conditional = clique->conditional(); │ │ │ │ +46 stats->conditionalSizes.push_back(conditional->nrFrontals()); │ │ │ │ +47 stats->separatorSizes.push_back(conditional->nrParents()); │ │ │ │ +48 for (_s_h_a_r_e_d_C_l_i_q_u_e c : clique->children) { │ │ │ │ +49 getCliqueData(c, stats); │ │ │ │ +50 } │ │ │ │ +51 } │ │ │ │ +52 │ │ │ │ +53 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -67template │ │ │ │ -_6_8_S_D_G_r_a_p_h_<_K_E_Y_> _t_o_B_o_o_s_t_G_r_a_p_h(const G& graph) { │ │ │ │ -69 // convert the factor graph to boost graph │ │ │ │ -70 _S_D_G_r_a_p_h_<_K_E_Y_> g; │ │ │ │ -71 typedef typename boost::graph_traits >::vertex_descriptor │ │ │ │ -BoostVertex; │ │ │ │ -72 std::map key2vertex; │ │ │ │ -73 typename G::const_iterator itFactor; │ │ │ │ -74 │ │ │ │ -75 // Loop over the factors │ │ │ │ -76 for(itFactor=graph.begin(); itFactor!=graph.end(); itFactor++) { │ │ │ │ -77 │ │ │ │ -78 // Ignore factors that are not binary │ │ │ │ -79 if ((*itFactor)->keys().size() != 2) │ │ │ │ -80 continue; │ │ │ │ -81 │ │ │ │ -82 // Cast the factor to the user-specified factor type F │ │ │ │ -83 boost::shared_ptr factor = boost::dynamic_pointer_cast(*itFactor); │ │ │ │ -84 // Ignore factors that are not of type F │ │ │ │ -85 if (!factor) continue; │ │ │ │ -86 │ │ │ │ -87 // Retrieve the 2 keys (nodes) the factor (edge) is incident on │ │ │ │ -88 KEY key1 = factor->keys()[0]; │ │ │ │ -89 KEY key2 = factor->keys()[1]; │ │ │ │ -90 │ │ │ │ -91 BoostVertex v1, v2; │ │ │ │ -92 │ │ │ │ -93 // If key1 is a new key, add it to the key2vertex map, else get the │ │ │ │ -corresponding vertex id │ │ │ │ -94 if (key2vertex.find(key1) == key2vertex.end()) { │ │ │ │ -95 v1 = add_vertex(key1, g); │ │ │ │ -96 key2vertex.insert(std::pair(key1, v1)); │ │ │ │ -97 } else │ │ │ │ -98 v1 = key2vertex[key1]; │ │ │ │ -99 │ │ │ │ -100 // If key2 is a new key, add it to the key2vertex map, else get the │ │ │ │ -corresponding vertex id │ │ │ │ -101 if (key2vertex.find(key2) == key2vertex.end()) { │ │ │ │ -102 v2 = add_vertex(key2, g); │ │ │ │ -103 key2vertex.insert(std::pair(key2, v2)); │ │ │ │ -104 } else │ │ │ │ -105 v2 = key2vertex[key2]; │ │ │ │ -106 │ │ │ │ -107 // Add an edge with weight 1.0 │ │ │ │ -108 boost::property edge_property(1.0); // assume │ │ │ │ -constant edge weight here │ │ │ │ -109 boost::add_edge(v1, v2, edge_property, g); │ │ │ │ -110 } │ │ │ │ -111 │ │ │ │ -112 return g; │ │ │ │ -113} │ │ │ │ -114 │ │ │ │ -115/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -116template │ │ │ │ -117boost::tuple > │ │ │ │ -_1_1_8_p_r_e_d_e_c_e_s_s_o_r_M_a_p_2_G_r_a_p_h(const _P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_>& p_map) { │ │ │ │ -119 │ │ │ │ -120 G g; │ │ │ │ -121 std::map key2vertex; │ │ │ │ -122 V v1, v2, root; │ │ │ │ -123 bool foundRoot = false; │ │ │ │ -124 for(auto child_parent: p_map) { │ │ │ │ -125 KEY child, parent; │ │ │ │ -126 std::tie(child,parent) = child_parent; │ │ │ │ -127 if (key2vertex.find(child) == key2vertex.end()) { │ │ │ │ -128 v1 = add_vertex(child, g); │ │ │ │ -129 key2vertex.insert(std::make_pair(child, v1)); │ │ │ │ -130 } else │ │ │ │ -131 v1 = key2vertex[child]; │ │ │ │ -132 │ │ │ │ -133 if (key2vertex.find(parent) == key2vertex.end()) { │ │ │ │ -134 v2 = add_vertex(parent, g); │ │ │ │ -135 key2vertex.insert(std::make_pair(parent, v2)); │ │ │ │ -136 } else │ │ │ │ -137 v2 = key2vertex[parent]; │ │ │ │ -138 │ │ │ │ -139 if (child==parent) { │ │ │ │ -140 root = v1; │ │ │ │ -141 foundRoot = true; │ │ │ │ -142 } else │ │ │ │ -143 boost::add_edge(v2, v1, g); // edge is from parent to child │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 if (!foundRoot) │ │ │ │ -147 throw std::invalid_argument("predecessorMap2Graph: invalid predecessor │ │ │ │ -map!"); │ │ │ │ -148 else │ │ │ │ -149 return boost::tuple >(g, root, key2vertex); │ │ │ │ -150} │ │ │ │ -151 │ │ │ │ -152/* ************************************************************************* │ │ │ │ +54 template │ │ │ │ +_5_5 size_t _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_n_u_m_C_a_c_h_e_d_S_e_p_a_r_a_t_o_r_M_a_r_g_i_n_a_l_s() const { │ │ │ │ +56 size_t count = 0; │ │ │ │ +57 for(const _s_h_a_r_e_d_C_l_i_q_u_e& root: roots_) │ │ │ │ +58 count += root->numCachedSeparatorMarginals(); │ │ │ │ +59 return count; │ │ │ │ +60 } │ │ │ │ +61 │ │ │ │ +62 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -153template │ │ │ │ -_1_5_4class _c_o_m_p_o_s_e___k_e_y___v_i_s_i_t_o_r : public boost::default_bfs_visitor { │ │ │ │ -155 │ │ │ │ -156private: │ │ │ │ -157 boost::shared_ptr config_; │ │ │ │ -158 │ │ │ │ -159public: │ │ │ │ -160 │ │ │ │ -161 _c_o_m_p_o_s_e___k_e_y___v_i_s_i_t_o_r(boost::shared_ptr config_in) {config_ = │ │ │ │ -config_in;} │ │ │ │ -162 │ │ │ │ -163 template void tree_edge(Edge edge, const │ │ │ │ -Graph& g) const { │ │ │ │ -164 KEY key_from = boost::get(boost::vertex_name, g, boost::source(edge, g)); │ │ │ │ -165 KEY key_to = boost::get(boost::vertex_name, g, boost::target(edge, g)); │ │ │ │ -166 POSE relativePose = boost::get(boost::edge_weight, g, edge); │ │ │ │ -167 config_->insert(key_to, config_->at(key_from).compose(relativePose)); │ │ │ │ -168 } │ │ │ │ -169 │ │ │ │ -170}; │ │ │ │ -171 │ │ │ │ -172/* ************************************************************************* │ │ │ │ +63 template │ │ │ │ +_6_4 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_d_o_t(std::ostream& os, │ │ │ │ +65 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter) const { │ │ │ │ +66 if (roots_.empty()) │ │ │ │ +67 throw std::invalid_argument( │ │ │ │ +68 "the root of Bayes tree has not been initialized!"); │ │ │ │ +69 os << "digraph G{\n"; │ │ │ │ +70 for (const _s_h_a_r_e_d_C_l_i_q_u_e& root : roots_) _d_o_t(os, root, keyFormatter); │ │ │ │ +71 os << "}"; │ │ │ │ +72 std::flush(os); │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +75 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -173template │ │ │ │ -_1_7_4boost::shared_ptr _c_o_m_p_o_s_e_P_o_s_e_s(const G& graph, const │ │ │ │ -_P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_>& tree, │ │ │ │ -175 const POSE& rootPose) { │ │ │ │ -176 │ │ │ │ -177 //TODO: change edge_weight_t to edge_pose_t │ │ │ │ -178 typedef typename boost::adjacency_list< │ │ │ │ -179 boost::vecS, boost::vecS, boost::directedS, │ │ │ │ -180 boost::property, │ │ │ │ -181 boost::property > PoseGraph; │ │ │ │ -182 typedef typename boost::graph_traits::vertex_descriptor │ │ │ │ -PoseVertex; │ │ │ │ -183 typedef typename boost::graph_traits::edge_descriptor PoseEdge; │ │ │ │ -184 │ │ │ │ -185 PoseGraph g; │ │ │ │ -186 PoseVertex root; │ │ │ │ -187 std::map key2vertex; │ │ │ │ -188 boost::tie(g, root, key2vertex) = │ │ │ │ -189 predecessorMap2Graph(tree); │ │ │ │ -190 │ │ │ │ -191 // attach the relative poses to the edges │ │ │ │ -192 PoseEdge edge12, edge21; │ │ │ │ -193 bool found1, found2; │ │ │ │ -194 for(typename G::sharedFactor nl_factor: graph) { │ │ │ │ -195 │ │ │ │ -196 if (nl_factor->keys().size() > 2) │ │ │ │ -197 throw std::invalid_argument("composePoses: only support factors with at │ │ │ │ -most two keys"); │ │ │ │ -198 │ │ │ │ -199 // e.g. in pose2graph, nonlinear factor needs to be converted to │ │ │ │ -pose2factor │ │ │ │ -200 boost::shared_ptr factor = boost::dynamic_pointer_cast │ │ │ │ -(nl_factor); │ │ │ │ -201 if (!factor) continue; │ │ │ │ -202 │ │ │ │ -203 KEY key1 = factor->key1(); │ │ │ │ -204 KEY key2 = factor->key2(); │ │ │ │ -205 │ │ │ │ -206 PoseVertex v1 = key2vertex.find(key1)->second; │ │ │ │ -207 PoseVertex v2 = key2vertex.find(key2)->second; │ │ │ │ -208 │ │ │ │ -209 POSE l1Xl2 = factor->measured(); │ │ │ │ -210 boost::tie(edge12, found1) = boost::edge(v1, v2, g); │ │ │ │ -211 boost::tie(edge21, found2) = boost::edge(v2, v1, g); │ │ │ │ -212 if (found1 && found2) throw std::invalid_argument ("composePoses: invalid │ │ │ │ -spanning tree"); │ │ │ │ -213 if (!found1 && !found2) continue; │ │ │ │ -214 if (found1) │ │ │ │ -215 boost::put(boost::edge_weight, g, edge12, l1Xl2); │ │ │ │ -216 else if (found2) │ │ │ │ -217 boost::put(boost::edge_weight, g, edge21, l1Xl2.inverse()); │ │ │ │ -218 } │ │ │ │ -219 │ │ │ │ -220 // compose poses │ │ │ │ -221 boost::shared_ptr config(new _V_a_l_u_e_s); │ │ │ │ -222 KEY rootKey = boost::get(boost::vertex_name, g, root); │ │ │ │ -223 config->insert(rootKey, rootPose); │ │ │ │ -224 _c_o_m_p_o_s_e___k_e_y___v_i_s_i_t_o_r_<_P_o_s_e_V_e_r_t_e_x_,_ _P_O_S_E_,_ _K_E_Y_> vis(config); │ │ │ │ -225 boost::breadth_first_search(g, root, boost::visitor(vis)); │ │ │ │ -226 │ │ │ │ -227 return config; │ │ │ │ -228} │ │ │ │ -229 │ │ │ │ -230/* ************************************************************************* │ │ │ │ +76 template │ │ │ │ +_7_7 std::string _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_d_o_t(const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter) const { │ │ │ │ +78 std::stringstream ss; │ │ │ │ +79 _d_o_t(ss, keyFormatter); │ │ │ │ +80 return ss.str(); │ │ │ │ +81 } │ │ │ │ +82 │ │ │ │ +83 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -231template │ │ │ │ -_2_3_2_P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_> _f_i_n_d_M_i_n_i_m_u_m_S_p_a_n_n_i_n_g_T_r_e_e(const G& fg) { │ │ │ │ -233 │ │ │ │ -234 // Convert to a graph that boost understands │ │ │ │ -235 _S_D_G_r_a_p_h_<_K_E_Y_> g = gtsam::toBoostGraph(fg); │ │ │ │ -236 │ │ │ │ -237 // find minimum spanning tree │ │ │ │ -238 std::vector::Vertex> p_map(boost::num_vertices(g)); │ │ │ │ -239 prim_minimum_spanning_tree(g, &p_map[0]); │ │ │ │ -240 │ │ │ │ -241 // convert edge to string pairs │ │ │ │ -242 _P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_> tree; │ │ │ │ -243 typename _S_D_G_r_a_p_h_<_K_E_Y_>_:_:_v_e_r_t_e_x___i_t_e_r_a_t_o_r itVertex = boost::vertices(g).first; │ │ │ │ -244 for(const typename SDGraph::Vertex& vi: p_map){ │ │ │ │ -245 KEY key = boost::get(boost::vertex_name, g, *itVertex); │ │ │ │ -246 KEY parent = boost::get(boost::vertex_name, g, vi); │ │ │ │ -247 tree._i_n_s_e_r_t(key, parent); │ │ │ │ -248 itVertex++; │ │ │ │ -249 } │ │ │ │ -250 return tree; │ │ │ │ -251} │ │ │ │ -252 │ │ │ │ -253/* ************************************************************************* │ │ │ │ +84 template │ │ │ │ +_8_5 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_s_a_v_e_G_r_a_p_h(const std::string& filename, │ │ │ │ +86 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter) const { │ │ │ │ +87 std::ofstream of(filename.c_str()); │ │ │ │ +88 _d_o_t(of, keyFormatter); │ │ │ │ +89 of.close(); │ │ │ │ +90 } │ │ │ │ +91 │ │ │ │ +92 /* ************************************************************************* │ │ │ │ */ │ │ │ │ -254template │ │ │ │ -_2_5_5void _s_p_l_i_t(const G& g, const _P_r_e_d_e_c_e_s_s_o_r_M_a_p_<_K_E_Y_>& tree, G& Ab1, G& Ab2) { │ │ │ │ -256 │ │ │ │ -257 typedef typename G::sharedFactor F ; │ │ │ │ -258 │ │ │ │ -259 for(const F& factor: g) │ │ │ │ -260 { │ │ │ │ -261 if (factor->keys().size() > 2) │ │ │ │ -262 throw(std::invalid_argument("split: only support factors with at most two │ │ │ │ -keys")); │ │ │ │ -263 │ │ │ │ -264 if (factor->keys().size() == 1) { │ │ │ │ -265 Ab1.push_back(factor); │ │ │ │ -266 continue; │ │ │ │ -267 } │ │ │ │ -268 │ │ │ │ -269 boost::shared_ptr factor2 = boost::dynamic_pointer_cast< │ │ │ │ -270 FACTOR2>(factor); │ │ │ │ -271 if (!factor2) continue; │ │ │ │ -272 │ │ │ │ -273 KEY key1 = factor2->key1(); │ │ │ │ -274 KEY key2 = factor2->key2(); │ │ │ │ -275 // if the tree contains the key │ │ │ │ -276 if ((tree.find(key1) != tree.end() && │ │ │ │ -277 tree.find(key1)->second.compare(key2) == 0) || │ │ │ │ -278 (tree.find(key2) != tree.end() && │ │ │ │ -279 tree.find(key2)->second.compare(key1)== 0) ) │ │ │ │ -280 Ab1.push_back(factor2); │ │ │ │ -281 else │ │ │ │ -282 Ab2.push_back(factor2); │ │ │ │ -283 } │ │ │ │ -284} │ │ │ │ -285 │ │ │ │ -286} │ │ │ │ -_g_r_a_p_h_._h │ │ │ │ -Graph algorithm using boost library. │ │ │ │ +93 template │ │ │ │ +_9_4 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_d_o_t(std::ostream& s, _s_h_a_r_e_d_C_l_i_q_u_e clique, │ │ │ │ +95 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter, │ │ │ │ +96 int parentnum) const { │ │ │ │ +97 static int num = 0; │ │ │ │ +98 bool first = true; │ │ │ │ +99 std::stringstream out; │ │ │ │ +100 out << num; │ │ │ │ +101 std::string parent = out.str(); │ │ │ │ +102 parent += "[label=\""; │ │ │ │ +103 │ │ │ │ +104 for (_K_e_y key : clique->conditional_->frontals()) { │ │ │ │ +105 if (!first) parent += ", "; │ │ │ │ +106 first = false; │ │ │ │ +107 parent += keyFormatter(key); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +110 if (clique->parent()) { │ │ │ │ +111 parent += " : "; │ │ │ │ +_1_1_2 s << parentnum << "->" << num << "\n"; │ │ │ │ +113 } │ │ │ │ +114 │ │ │ │ +115 first = true; │ │ │ │ +116 for (_K_e_y parentKey : clique->conditional_->parents()) { │ │ │ │ +_1_1_7 if (!first) parent += ", "; │ │ │ │ +118 first = false; │ │ │ │ +119 parent += keyFormatter(parentKey); │ │ │ │ +120 } │ │ │ │ +121 parent += "\"];\n"; │ │ │ │ +122 s << parent; │ │ │ │ +_1_2_3 parentnum = num; │ │ │ │ +124 │ │ │ │ +125 for (_s_h_a_r_e_d_C_l_i_q_u_e c : clique->children) { │ │ │ │ +126 num++; │ │ │ │ +_1_2_7 _d_o_t(s, c, keyFormatter, parentnum); │ │ │ │ +128 } │ │ │ │ +129 } │ │ │ │ +130 │ │ │ │ +131 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +132 template │ │ │ │ +_1_3_3 size_t _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_s_i_z_e() const { │ │ │ │ +134 size_t size = 0; │ │ │ │ +_1_3_5 for(const _s_h_a_r_e_d_C_l_i_q_u_e& clique: roots_) │ │ │ │ +136 size += clique->treeSize(); │ │ │ │ +137 return size; │ │ │ │ +138 } │ │ │ │ +139 │ │ │ │ +140 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +141 template │ │ │ │ +_1_4_2 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_a_d_d_C_l_i_q_u_e(const _s_h_a_r_e_d_C_l_i_q_u_e& clique, const │ │ │ │ +_s_h_a_r_e_d_C_l_i_q_u_e& parent_clique) { │ │ │ │ +143 for(_K_e_y j: clique->conditional()->frontals()) │ │ │ │ +144 nodes_[j] = clique; │ │ │ │ +145 if (parent_clique != nullptr) { │ │ │ │ +146 clique->parent_ = parent_clique; │ │ │ │ +147 parent_clique->children.push_back(clique); │ │ │ │ +148 } else { │ │ │ │ +149 roots_.push_back(clique); │ │ │ │ +150 } │ │ │ │ +151 } │ │ │ │ +152 │ │ │ │ +153 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +154 namespace { │ │ │ │ +155 template │ │ │ │ +156 struct _pushCliqueFunctor { │ │ │ │ +157 _pushCliqueFunctor(_F_a_c_t_o_r_G_r_a_p_h_<_F_A_C_T_O_R_>* graph_) : graph(graph_) {} │ │ │ │ +158 FactorGraph* graph; │ │ │ │ +159 int operator()(const boost::shared_ptr& clique, int dummy) { │ │ │ │ +160 graph->push_back(clique->conditional_); │ │ │ │ +_1_6_1 return 0; │ │ │ │ +162 } │ │ │ │ +163 }; │ │ │ │ +_1_6_4 } // namespace │ │ │ │ +165 │ │ │ │ +166 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +167 template │ │ │ │ +_1_6_8 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_a_d_d_F_a_c_t_o_r_s_T_o_G_r_a_p_h( │ │ │ │ +169 _F_a_c_t_o_r_G_r_a_p_h_<_F_a_c_t_o_r_T_y_p_e_>* graph) const { │ │ │ │ +170 // Traverse the BayesTree and add all conditionals to this graph │ │ │ │ +_1_7_1 int data = 0; // Unused │ │ │ │ +172 _pushCliqueFunctor functor(graph); │ │ │ │ +173 _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(*this, data, functor); │ │ │ │ +174 } │ │ │ │ +175 │ │ │ │ +176 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +_1_7_7 template │ │ │ │ +_1_7_8 _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_B_a_y_e_s_T_r_e_e(const _T_h_i_s& other) { │ │ │ │ +179 *this = other; │ │ │ │ +180 } │ │ │ │ +181 │ │ │ │ +182 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +_1_8_3 namespace { │ │ │ │ +184 template │ │ │ │ +185 boost::shared_ptr │ │ │ │ +186 BayesTreeCloneForestVisitorPre(const boost::shared_ptr& node, const │ │ │ │ +boost::shared_ptr& parentPointer) │ │ │ │ +187 { │ │ │ │ +188 // Clone the current node and add it to its cloned parent │ │ │ │ +_1_8_9 boost::shared_ptr clone = boost::make_shared(*node); │ │ │ │ +190 clone->children.clear(); │ │ │ │ +191 clone->parent_ = parentPointer; │ │ │ │ +_1_9_2 parentPointer->children.push_back(clone); │ │ │ │ +193 return clone; │ │ │ │ +194 } │ │ │ │ +195 } │ │ │ │ +_1_9_6 │ │ │ │ +197 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +198 template │ │ │ │ +_1_9_9 _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>& _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_o_p_e_r_a_t_o_r_=(const _T_h_i_s& other) { │ │ │ │ +200 this->clear(); │ │ │ │ +201 boost::shared_ptr rootContainer = boost::make_shared(); │ │ │ │ +202 _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(other, rootContainer, │ │ │ │ +BayesTreeCloneForestVisitorPre); │ │ │ │ +203 for(const _s_h_a_r_e_d_C_l_i_q_u_e& root: rootContainer->children) { │ │ │ │ +204 root->parent_ = typename Clique::weak_ptr(); // Reset the parent since it's │ │ │ │ +set to the dummy clique │ │ │ │ +205 insertRoot(root); │ │ │ │ +206 } │ │ │ │ +207 return *this; │ │ │ │ +_2_0_8 } │ │ │ │ +209 │ │ │ │ +210 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +_2_1_1 template │ │ │ │ +_2_1_2 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_p_r_i_n_t(const std::string& s, const _K_e_y_F_o_r_m_a_t_t_e_r& │ │ │ │ +keyFormatter) const { │ │ │ │ +213 std::cout << s << ": cliques: " << size() << ", variables: " << nodes_.size │ │ │ │ +() << std::endl; │ │ │ │ +_2_1_4 _t_r_e_e_T_r_a_v_e_r_s_a_l_:_:_P_r_i_n_t_F_o_r_e_s_t(*this, s, keyFormatter); │ │ │ │ +215 } │ │ │ │ +216 │ │ │ │ +217 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +218 // binary predicate to test equality of a pair for use in equals │ │ │ │ +219 template │ │ │ │ +_2_2_0 bool check_sharedCliques( │ │ │ │ +221 const std::pair<_K_e_y, typename _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_s_h_a_r_e_d_C_l_i_q_u_e>& v1, │ │ │ │ +222 const std::pair<_K_e_y, typename _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_s_h_a_r_e_d_C_l_i_q_u_e>& v2 │ │ │ │ +223 ) { │ │ │ │ +224 return v1.first == v2.first && │ │ │ │ +225 ((!v1.second && !v2.second) || (v1.second && v2.second && v1.second->equals │ │ │ │ +(*v2.second))); │ │ │ │ +_2_2_6 } │ │ │ │ +227 │ │ │ │ +228 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +229 template │ │ │ │ +_2_3_0 bool _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_e_q_u_a_l_s(const _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>& other, double tol) │ │ │ │ +const { │ │ │ │ +231 return size()==other._s_i_z_e() && │ │ │ │ +232 std::equal(nodes_.begin(), nodes_.end(), other._n_o_d_e_s__.begin(), │ │ │ │ +&check_sharedCliques); │ │ │ │ +233 } │ │ │ │ +234 │ │ │ │ +_2_3_5 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +236 template │ │ │ │ +237 template │ │ │ │ +_2_3_8 _K_e_y _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_f_i_n_d_P_a_r_e_n_t_C_l_i_q_u_e(const CONTAINER& parents) const { │ │ │ │ +239 typename CONTAINER::const_iterator lowestOrderedParent = min_element │ │ │ │ +(parents.begin(), parents.end()); │ │ │ │ +240 assert(lowestOrderedParent != parents.end()); │ │ │ │ +_2_4_1 return *lowestOrderedParent; │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +244 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +245 template │ │ │ │ +_2_4_6 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_f_i_l_l_N_o_d_e_s_I_n_d_e_x(const _s_h_a_r_e_d_C_l_i_q_u_e& subtree) { │ │ │ │ +247 // Add each frontal variable of this root node │ │ │ │ +248 for(const _K_e_y& j: subtree->conditional()->frontals()) { │ │ │ │ +249 bool inserted = nodes_.insert(std::make_pair(j, subtree)).second; │ │ │ │ +_2_5_0 assert(inserted); (void)inserted; │ │ │ │ +251 } │ │ │ │ +252 // Fill index for each child │ │ │ │ +_2_5_3 typedef typename _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_s_h_a_r_e_d_C_l_i_q_u_e _s_h_a_r_e_d_C_l_i_q_u_e; │ │ │ │ +254 for(const _s_h_a_r_e_d_C_l_i_q_u_e& child: subtree->children) { │ │ │ │ +255 fillNodesIndex(child); } │ │ │ │ +_2_5_6 } │ │ │ │ +257 │ │ │ │ +258 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +259 template │ │ │ │ +_2_6_0 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_i_n_s_e_r_t_R_o_o_t(const _s_h_a_r_e_d_C_l_i_q_u_e& subtree) { │ │ │ │ +261 roots_.push_back(subtree); // Add to roots │ │ │ │ +262 fillNodesIndex(subtree); // Populate nodes index │ │ │ │ +263 } │ │ │ │ +264 │ │ │ │ +265 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +266 // First finds clique marginal then marginalizes that │ │ │ │ +267 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +268 template │ │ │ │ +269 typename BayesTree::sharedConditional │ │ │ │ +_2_7_0 _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_m_a_r_g_i_n_a_l_F_a_c_t_o_r(_K_e_y j, const Eliminate& function) const │ │ │ │ +271 { │ │ │ │ +272 gttic(BayesTree_marginalFactor); │ │ │ │ +273 │ │ │ │ +274 // get clique containing Key j │ │ │ │ +275 _s_h_a_r_e_d_C_l_i_q_u_e clique = this->clique(j); │ │ │ │ +276 │ │ │ │ +277 // calculate or retrieve its marginal P(C) = P(F,S) │ │ │ │ +278 FactorGraphType cliqueMarginal = clique->marginal2(function); │ │ │ │ +279 │ │ │ │ +280 // Now, marginalize out everything that is not variable j │ │ │ │ +281 BayesNetType marginalBN = │ │ │ │ +282 *cliqueMarginal.marginalMultifrontalBayesNet(_O_r_d_e_r_i_n_g{j}, function); │ │ │ │ +283 │ │ │ │ +284 // The Bayes net should contain only one conditional for variable j, so │ │ │ │ +return it │ │ │ │ +285 return marginalBN.front(); │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +288 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +289 // Find two cliques, their joint, then marginalizes │ │ │ │ +290 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +291 template │ │ │ │ +292 typename BayesTree::sharedFactorGraph │ │ │ │ +_2_9_3 _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_j_o_i_n_t(_K_e_y j1, _K_e_y j2, const Eliminate& function) const │ │ │ │ +294 { │ │ │ │ +295 gttic(BayesTree_joint); │ │ │ │ +296 return boost::make_shared(*jointBayesNet(j1, j2, │ │ │ │ +function)); │ │ │ │ +297 } │ │ │ │ +298 │ │ │ │ +299 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +300 template │ │ │ │ +301 typename BayesTree::sharedBayesNet │ │ │ │ +_3_0_2 _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_j_o_i_n_t_B_a_y_e_s_N_e_t(_K_e_y j1, _K_e_y j2, const Eliminate& function) │ │ │ │ +const │ │ │ │ +303 { │ │ │ │ +304 gttic(BayesTree_jointBayesNet); │ │ │ │ +305 // get clique C1 and C2 │ │ │ │ +306 _s_h_a_r_e_d_C_l_i_q_u_e C1 = (*this)[j1], C2 = (*this)[j2]; │ │ │ │ +307 │ │ │ │ +308 gttic(Lowest_common_ancestor); │ │ │ │ +309 // Find lowest common ancestor clique │ │ │ │ +310 _s_h_a_r_e_d_C_l_i_q_u_e B; { │ │ │ │ +311 // Build two paths to the root │ │ │ │ +312 _F_a_s_t_L_i_s_t_<_s_h_a_r_e_d_C_l_i_q_u_e_> path1, path2; { │ │ │ │ +313 _s_h_a_r_e_d_C_l_i_q_u_e p = C1; │ │ │ │ +314 while(p) { │ │ │ │ +315 path1.push_front(p); │ │ │ │ +316 p = p->parent(); │ │ │ │ +317 } │ │ │ │ +318 } { │ │ │ │ +319 _s_h_a_r_e_d_C_l_i_q_u_e p = C2; │ │ │ │ +320 while(p) { │ │ │ │ +321 path2.push_front(p); │ │ │ │ +322 p = p->parent(); │ │ │ │ +323 } │ │ │ │ +324 } │ │ │ │ +325 // Find the path intersection │ │ │ │ +326 typename _F_a_s_t_L_i_s_t_<_s_h_a_r_e_d_C_l_i_q_u_e_>_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r p1 = path1.begin(), p2 = │ │ │ │ +path2.begin(); │ │ │ │ +327 if(*p1 == *p2) │ │ │ │ +328 B = *p1; │ │ │ │ +329 while(p1 != path1.end() && p2 != path2.end() && *p1 == *p2) { │ │ │ │ +330 B = *p1; │ │ │ │ +331 ++p1; │ │ │ │ +332 ++p2; │ │ │ │ +333 } │ │ │ │ +334 } │ │ │ │ +335 gttoc(Lowest_common_ancestor); │ │ │ │ +336 │ │ │ │ +337 // Build joint on all involved variables │ │ │ │ +338 FactorGraphType p_BC1C2; │ │ │ │ +339 │ │ │ │ +340 if(B) │ │ │ │ +341 { │ │ │ │ +342 // Compute marginal on lowest common ancestor clique │ │ │ │ +343 gttic(LCA_marginal); │ │ │ │ +344 FactorGraphType p_B = B->marginal2(function); │ │ │ │ +345 gttoc(LCA_marginal); │ │ │ │ +346 │ │ │ │ +347 // Compute shortcuts of the requested cliques given the lowest common │ │ │ │ +ancestor │ │ │ │ +348 gttic(Clique_shortcuts); │ │ │ │ +349 BayesNetType p_C1_Bred = C1->shortcut(B, function); │ │ │ │ +350 BayesNetType p_C2_Bred = C2->shortcut(B, function); │ │ │ │ +351 gttoc(Clique_shortcuts); │ │ │ │ +352 │ │ │ │ +353 // Factor the shortcuts to be conditioned on the full root │ │ │ │ +354 // Get the set of variables to eliminate, which is C1\B. │ │ │ │ +355 gttic(Full_root_factoring); │ │ │ │ +356 boost::shared_ptr p_C1_B; { │ │ │ │ +357 _K_e_y_V_e_c_t_o_r C1_minus_B; { │ │ │ │ +358 _K_e_y_S_e_t C1_minus_B_set(C1->conditional()->beginParents(), C1->conditional()- │ │ │ │ +>endParents()); │ │ │ │ +359 for(const _K_e_y j: *B->conditional()) { │ │ │ │ +360 C1_minus_B_set.erase(j); } │ │ │ │ +361 C1_minus_B.assign(C1_minus_B_set.begin(), C1_minus_B_set.end()); │ │ │ │ +362 } │ │ │ │ +363 // Factor into C1\B | B. │ │ │ │ +364 sharedFactorGraph temp_remaining; │ │ │ │ +365 boost::tie(p_C1_B, temp_remaining) = │ │ │ │ +366 FactorGraphType(p_C1_Bred).eliminatePartialMultifrontal(_O_r_d_e_r_i_n_g │ │ │ │ +(C1_minus_B), function); │ │ │ │ +367 } │ │ │ │ +368 boost::shared_ptr p_C2_B; { │ │ │ │ +369 _K_e_y_V_e_c_t_o_r C2_minus_B; { │ │ │ │ +370 _K_e_y_S_e_t C2_minus_B_set(C2->conditional()->beginParents(), C2->conditional()- │ │ │ │ +>endParents()); │ │ │ │ +371 for(const _K_e_y j: *B->conditional()) { │ │ │ │ +372 C2_minus_B_set.erase(j); } │ │ │ │ +373 C2_minus_B.assign(C2_minus_B_set.begin(), C2_minus_B_set.end()); │ │ │ │ +374 } │ │ │ │ +375 // Factor into C2\B | B. │ │ │ │ +376 sharedFactorGraph temp_remaining; │ │ │ │ +377 boost::tie(p_C2_B, temp_remaining) = │ │ │ │ +378 FactorGraphType(p_C2_Bred).eliminatePartialMultifrontal(_O_r_d_e_r_i_n_g │ │ │ │ +(C2_minus_B), function); │ │ │ │ +379 } │ │ │ │ +380 gttoc(Full_root_factoring); │ │ │ │ +381 │ │ │ │ +382 gttic(Variable_joint); │ │ │ │ +383 p_BC1C2 += p_B; │ │ │ │ +384 p_BC1C2 += *p_C1_B; │ │ │ │ +385 p_BC1C2 += *p_C2_B; │ │ │ │ +386 if(C1 != B) │ │ │ │ +387 p_BC1C2 += C1->conditional(); │ │ │ │ +388 if(C2 != B) │ │ │ │ +389 p_BC1C2 += C2->conditional(); │ │ │ │ +390 gttoc(Variable_joint); │ │ │ │ +391 } │ │ │ │ +392 else │ │ │ │ +393 { │ │ │ │ +394 // The nodes have no common ancestor, they're in different trees, so │ │ │ │ +they're joint is just the │ │ │ │ +395 // product of their marginals. │ │ │ │ +396 gttic(Disjoint_marginals); │ │ │ │ +397 p_BC1C2 += C1->marginal2(function); │ │ │ │ +398 p_BC1C2 += C2->marginal2(function); │ │ │ │ +399 gttoc(Disjoint_marginals); │ │ │ │ +400 } │ │ │ │ +401 │ │ │ │ +402 // now, marginalize out everything that is not variable j1 or j2 │ │ │ │ +403 return p_BC1C2.marginalMultifrontalBayesNet(_O_r_d_e_r_i_n_g{j1, j2}, function); │ │ │ │ +404 } │ │ │ │ +405 │ │ │ │ +406 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +407 template │ │ │ │ +_4_0_8 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_c_l_e_a_r() { │ │ │ │ +409 // Remove all nodes and clear the root pointer │ │ │ │ +410 nodes_.clear(); │ │ │ │ +411 roots_.clear(); │ │ │ │ +412 } │ │ │ │ +413 │ │ │ │ +414 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +415 template │ │ │ │ +_4_1_6 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_d_e_l_e_t_e_C_a_c_h_e_d_S_h_o_r_t_c_u_t_s() { │ │ │ │ +417 for(const _s_h_a_r_e_d_C_l_i_q_u_e& root: roots_) { │ │ │ │ +418 root->deleteCachedShortcuts(); │ │ │ │ +419 } │ │ │ │ +420 } │ │ │ │ +421 │ │ │ │ +422 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +423 template │ │ │ │ +_4_2_4 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_r_e_m_o_v_e_C_l_i_q_u_e(_s_h_a_r_e_d_C_l_i_q_u_e clique) │ │ │ │ +425 { │ │ │ │ +426 if (clique->isRoot()) { │ │ │ │ +427 typename Roots::iterator root = std::find(roots_.begin(), roots_.end(), │ │ │ │ +clique); │ │ │ │ +428 if(root != roots_.end()) │ │ │ │ +429 roots_.erase(root); │ │ │ │ +430 } else { // detach clique from parent │ │ │ │ +431 _s_h_a_r_e_d_C_l_i_q_u_e parent = clique->parent_.lock(); │ │ │ │ +432 typename Roots::iterator child = std::find(parent->children.begin(), │ │ │ │ +parent->children.end(), clique); │ │ │ │ +433 assert(child != parent->children.end()); │ │ │ │ +434 parent->children.erase(child); │ │ │ │ +435 } │ │ │ │ +436 │ │ │ │ +437 // orphan my children │ │ │ │ +438 for(_s_h_a_r_e_d_C_l_i_q_u_e child: clique->children) │ │ │ │ +439 child->parent_ = typename Clique::weak_ptr(); │ │ │ │ +440 │ │ │ │ +441 for(_K_e_y j: clique->conditional()->frontals()) { │ │ │ │ +442 nodes_.unsafe_erase(j); │ │ │ │ +443 } │ │ │ │ +444 } │ │ │ │ +445 │ │ │ │ +446 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +447 template │ │ │ │ +_4_4_8 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_r_e_m_o_v_e_P_a_t_h(_s_h_a_r_e_d_C_l_i_q_u_e clique, BayesNetType* bn, │ │ │ │ +449 _C_l_i_q_u_e_s* orphans) { │ │ │ │ +450 // base case is nullptr, if so we do nothing and return empties above │ │ │ │ +451 if (clique) { │ │ │ │ +452 // remove the clique from orphans in case it has been added earlier │ │ │ │ +453 orphans->remove(clique); │ │ │ │ +454 │ │ │ │ +455 // remove me │ │ │ │ +456 this->removeClique(clique); │ │ │ │ +457 │ │ │ │ +458 // remove path above me │ │ │ │ +459 this->removePath(typename Clique::shared_ptr(clique->parent_.lock()), bn, │ │ │ │ +460 orphans); │ │ │ │ +461 │ │ │ │ +462 // add children to list of orphans (splice also removed them from │ │ │ │ +463 // clique->children_) │ │ │ │ +464 orphans->insert(orphans->begin(), clique->children.begin(), │ │ │ │ +465 clique->children.end()); │ │ │ │ +466 clique->children.clear(); │ │ │ │ +467 │ │ │ │ +468 bn->push_back(clique->conditional_); │ │ │ │ +469 } │ │ │ │ +470 } │ │ │ │ +471 │ │ │ │ +472 / │ │ │ │ +* ************************************************************************* │ │ │ │ +473 */ │ │ │ │ +474 template │ │ │ │ +_4_7_5 void _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_r_e_m_o_v_e_T_o_p(const _K_e_y_V_e_c_t_o_r& keys, BayesNetType* bn, │ │ │ │ +476 _C_l_i_q_u_e_s* orphans) { │ │ │ │ +477 gttic(removetop); │ │ │ │ +478 // process each key of the new factor │ │ │ │ +479 for (const _K_e_y& j : keys) { │ │ │ │ +480 // get the clique │ │ │ │ +481 // TODO(frank): Nodes will be searched again in removeClique │ │ │ │ +482 typename Nodes::const_iterator node = nodes_.find(j); │ │ │ │ +483 if (node != nodes_.end()) { │ │ │ │ +484 // remove path from clique to root │ │ │ │ +485 this->removePath(node->second, bn, orphans); │ │ │ │ +486 } │ │ │ │ +487 } │ │ │ │ +488 │ │ │ │ +489 // Delete cachedShortcuts for each orphan subtree │ │ │ │ +490 // TODO(frank): Consider Improving │ │ │ │ +491 for (_s_h_a_r_e_d_C_l_i_q_u_e& orphan : *orphans) orphan->deleteCachedShortcuts(); │ │ │ │ +492 } │ │ │ │ +493 │ │ │ │ +494 / │ │ │ │ +* ************************************************************************* */ │ │ │ │ +495 template │ │ │ │ +_4_9_6 typename _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_C_l_i_q_u_e_s _B_a_y_e_s_T_r_e_e_<_C_L_I_Q_U_E_>_:_:_r_e_m_o_v_e_S_u_b_t_r_e_e( │ │ │ │ +497 const _s_h_a_r_e_d_C_l_i_q_u_e& subtree) │ │ │ │ +498 { │ │ │ │ +499 // Result clique list │ │ │ │ +500 _C_l_i_q_u_e_s cliques; │ │ │ │ +501 cliques.push_back(subtree); │ │ │ │ +502 │ │ │ │ +503 // Remove the first clique from its parents │ │ │ │ +504 if(!subtree->isRoot()) │ │ │ │ +505 subtree->parent()->children.erase(std::find( │ │ │ │ +506 subtree->parent()->children.begin(), subtree->parent()->children.end(), │ │ │ │ +subtree)); │ │ │ │ +507 else │ │ │ │ +508 roots_.erase(std::find(roots_.begin(), roots_.end(), subtree)); │ │ │ │ +509 │ │ │ │ +510 // Add all subtree cliques and erase the children and parent of each │ │ │ │ +511 for(typename Cliques::iterator clique = cliques.begin(); clique != │ │ │ │ +cliques.end(); ++clique) │ │ │ │ +512 { │ │ │ │ +513 // Add children │ │ │ │ +514 for(const _s_h_a_r_e_d_C_l_i_q_u_e& child: (*clique)->children) { │ │ │ │ +515 cliques.push_back(child); } │ │ │ │ +516 │ │ │ │ +517 // Delete cached shortcuts │ │ │ │ +518 (*clique)->deleteCachedShortcutsNonRecursive(); │ │ │ │ +519 │ │ │ │ +520 // Remove this node from the nodes index │ │ │ │ +521 for(_K_e_y j: (*clique)->conditional()->frontals()) { │ │ │ │ +522 nodes_.unsafe_erase(j); } │ │ │ │ +523 │ │ │ │ +524 // Erase the parent and children pointers │ │ │ │ +525 (*clique)->parent_.reset(); │ │ │ │ +526 (*clique)->children.clear(); │ │ │ │ +527 } │ │ │ │ +528 │ │ │ │ +529 return cliques; │ │ │ │ +530 } │ │ │ │ +531 │ │ │ │ +532} │ │ │ │ +_t_i_m_i_n_g_._h │ │ │ │ +Timing utilities. │ │ │ │ +_t_r_e_e_T_r_a_v_e_r_s_a_l_-_i_n_s_t_._h │ │ │ │ +_B_a_y_e_s_T_r_e_e_._h │ │ │ │ +Bayes Tree is a tree of cliques of a Bayes Chain. │ │ │ │ +_O_r_d_e_r_i_n_g_._h │ │ │ │ +Variable ordering for the elimination algorithm. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ -_g_t_s_a_m_:_:_p_r_e_d_e_c_e_s_s_o_r_M_a_p_2_K_e_y_s │ │ │ │ -std::list< KEY > predecessorMap2Keys(const PredecessorMap< KEY > &p_map) │ │ │ │ -Generate a list of keys from a spanning tree represented by its predecessor │ │ │ │ -map. │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:50 │ │ │ │ -_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_o_m_p_o_s_e_P_o_s_e_s │ │ │ │ -boost::shared_ptr< Values > composePoses(const G &graph, const PredecessorMap< │ │ │ │ -KEY > &tree, const POSE &rootPose) │ │ │ │ -Compose the poses by following the chain specified by the spanning tree. │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:174 │ │ │ │ -_g_t_s_a_m_:_:_t_o_B_o_o_s_t_G_r_a_p_h │ │ │ │ -SDGraph< KEY > toBoostGraph(const G &graph) │ │ │ │ -Convert the factor graph to an SDGraph G = Graph type F = Factor type Key = Key │ │ │ │ -type. │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:68 │ │ │ │ -_g_t_s_a_m_:_:_f_i_n_d_M_i_n_i_m_u_m_S_p_a_n_n_i_n_g_T_r_e_e │ │ │ │ -PredecessorMap< KEY > findMinimumSpanningTree(const G &fg) │ │ │ │ -find the minimum spanning tree using boost graph library │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:232 │ │ │ │ -_g_t_s_a_m_:_:_p_r_e_d_e_c_e_s_s_o_r_M_a_p_2_G_r_a_p_h │ │ │ │ -boost::tuple< G, V, std::map< KEY, V > > predecessorMap2Graph(const │ │ │ │ -PredecessorMap< KEY > &p_map) │ │ │ │ -Build takes a predecessor map, and builds a directed graph corresponding to the │ │ │ │ -tree. │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:118 │ │ │ │ -_g_t_s_a_m_:_:_o_r_d_e_r_i_n_g___k_e_y___v_i_s_i_t_o_r │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:38 │ │ │ │ -_g_t_s_a_m_:_:_c_o_m_p_o_s_e___k_e_y___v_i_s_i_t_o_r │ │ │ │ -DDeeffiinniittiioonn graph-inl.h:154 │ │ │ │ -_g_t_s_a_m_:_:_S_D_G_r_a_p_h │ │ │ │ -SDGraph is undirected graph with variable keys and double edge weights. │ │ │ │ -DDeeffiinniittiioonn graph.h:40 │ │ │ │ -_g_t_s_a_m_:_:_S_G_r_a_p_h │ │ │ │ -DDeeffiinniittiioonn graph.h:47 │ │ │ │ -_g_t_s_a_m_:_:_P_r_e_d_e_c_e_s_s_o_r_M_a_p │ │ │ │ -Map from variable key to parent key. │ │ │ │ -DDeeffiinniittiioonn graph.h:58 │ │ │ │ -_g_t_s_a_m_:_:_P_r_e_d_e_c_e_s_s_o_r_M_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(const KEY &key, const KEY &parent) │ │ │ │ -convenience insert so we can pass ints for TypedSymbol keys │ │ │ │ -DDeeffiinniittiioonn graph.h:61 │ │ │ │ -_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_:_:_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_:_:_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_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_:_:_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_:_:_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_S_e_t_<_ _K_e_y_ _> │ │ │ │ +_g_t_s_a_m_:_:_F_a_c_t_o_r_G_r_a_p_h │ │ │ │ +A factor graph is a bipartite graph with factor nodes connected to variable │ │ │ │ +nodes. │ │ │ │ +DDeeffiinniittiioonn FactorGraph.h:97 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_C_l_i_q_u_e_D_a_t_a │ │ │ │ +store all the sizes │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:48 │ │ │ │ +_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_:_:_n_o_d_e_s__ │ │ │ │ +Nodes nodes_ │ │ │ │ +Map from indices to Clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:100 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_C_l_i_q_u_e │ │ │ │ +void removeClique(sharedClique clique) │ │ │ │ +remove a clique: warning, can result in a forest │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:424 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_j_o_i_n_t │ │ │ │ +sharedFactorGraph joint(Key j1, Key j2, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +return joint on two variables Limitation: can only calculate joint if cliques │ │ │ │ +are disjoint or one of ... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:293 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_f_i_l_l_N_o_d_e_s_I_n_d_e_x │ │ │ │ +void fillNodesIndex(const sharedClique &subtree) │ │ │ │ +Fill the nodes index for a subtree. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:246 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_d_o_t │ │ │ │ +void dot(std::ostream &os, const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +Output to graphviz format, stream version. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:64 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_a_d_d_F_a_c_t_o_r_s_T_o_G_r_a_p_h │ │ │ │ +void addFactorsToGraph(FactorGraph< FactorType > *graph) const │ │ │ │ +Add all cliques in this BayesTree to the specified factor graph. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:168 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &other, double tol=1e-9) const │ │ │ │ +check equality │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:230 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +This & operator=(const This &other) │ │ │ │ +Assignment operator. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:199 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_h_a_r_e_d_C_l_i_q_u_e │ │ │ │ +boost::shared_ptr< Clique > sharedClique │ │ │ │ +Shared pointer to a clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:74 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_B_a_y_e_s_T_r_e_e │ │ │ │ +BayesTree() │ │ │ │ +Create an empty Bayes Tree. │ │ │ │ +DDeeffiinniittiioonn BayesTree.h:109 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_c_l_e_a_r │ │ │ │ +void clear() │ │ │ │ +Remove all nodes. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:408 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_a_d_d_C_l_i_q_u_e │ │ │ │ +void addClique(const sharedClique &clique, const sharedClique │ │ │ │ +&parent_clique=sharedClique()) │ │ │ │ +add a clique (top down) │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:142 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_j_o_i_n_t_B_a_y_e_s_N_e_t │ │ │ │ +sharedBayesNet jointBayesNet(Key j1, Key j2, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +return joint on two variables as a BayesNet Limitation: can only calculate │ │ │ │ +joint if cliques are disjo... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:302 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_f_i_n_d_P_a_r_e_n_t_C_l_i_q_u_e │ │ │ │ +Key findParentClique(const CONTAINER &parents) const │ │ │ │ +Find parent clique of a conditional. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:238 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_i_z_e │ │ │ │ +size_t size() const │ │ │ │ +number of cliques │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:133 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_d_e_l_e_t_e_C_a_c_h_e_d_S_h_o_r_t_c_u_t_s │ │ │ │ +void deleteCachedShortcuts() │ │ │ │ +Clear all shortcut caches - use before timing on marginal calculation to avoid │ │ │ │ +residual cache data. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:416 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_P_a_t_h │ │ │ │ +void removePath(sharedClique clique, BayesNetType *bn, Cliques *orphans) │ │ │ │ +Remove path from clique to root and return that path as factors plus a list of │ │ │ │ +orphaned subtree roots... │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:448 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_m_a_r_g_i_n_a_l_F_a_c_t_o_r │ │ │ │ +sharedConditional marginalFactor(Key j, const Eliminate │ │ │ │ +&function=EliminationTraitsType::DefaultEliminate) const │ │ │ │ +Return marginal on any variable. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:270 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_n_u_m_C_a_c_h_e_d_S_e_p_a_r_a_t_o_r_M_a_r_g_i_n_a_l_s │ │ │ │ +size_t numCachedSeparatorMarginals() const │ │ │ │ +Collect number of cliques with cached separator marginals. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:55 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_g_e_t_C_l_i_q_u_e_D_a_t_a │ │ │ │ +BayesTreeCliqueData getCliqueData() const │ │ │ │ +Gather data on all cliques. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:35 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_S_u_b_t_r_e_e │ │ │ │ +Cliques removeSubtree(const sharedClique &subtree) │ │ │ │ +Remove the requested subtree. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:496 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="", const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +print │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:212 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_i_n_s_e_r_t_R_o_o_t │ │ │ │ +void insertRoot(const sharedClique &subtree) │ │ │ │ +Insert a new subtree with known parent clique. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:260 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_s_a_v_e_G_r_a_p_h │ │ │ │ +void saveGraph(const std::string &filename, const KeyFormatter │ │ │ │ +&keyFormatter=DefaultKeyFormatter) const │ │ │ │ +output to file with graphviz format. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:85 │ │ │ │ +_g_t_s_a_m_:_:_B_a_y_e_s_T_r_e_e_:_:_r_e_m_o_v_e_T_o_p │ │ │ │ +void removeTop(const KeyVector &keys, BayesNetType *bn, Cliques *orphans) │ │ │ │ +Given a list of indices, turn "contaminated" part of the tree back into a │ │ │ │ +factor graph. │ │ │ │ +DDeeffiinniittiioonn BayesTree-inst.h:475 │ │ │ │ +_g_t_s_a_m_:_:_O_r_d_e_r_i_n_g │ │ │ │ +DDeeffiinniittiioonn Ordering.h:34 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * ggrraapphh--iinnll..hh │ │ │ │ + * _B_a_y_e_s_T_r_e_e_-_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/a00587_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableSlots.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Conditional-inst.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,126 +98,143 @@ │ │ │
No Matches
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
VariableSlots.h
│ │ │ +
Conditional-inst.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// \callgraph
│ │ │
19#pragma once
│ │ │
20
│ │ │ - │ │ │ -
22#include <gtsam/base/FastMap.h>
│ │ │ - │ │ │ -
24#include <gtsam/base/timing.h>
│ │ │ -
25#include <gtsam/base/Testable.h>
│ │ │ -
26
│ │ │ -
27#include <boost/tuple/tuple.hpp>
│ │ │ -
28
│ │ │ -
29#include <iostream>
│ │ │ -
30#include <string>
│ │ │ -
31
│ │ │ -
32namespace gtsam {
│ │ │ -
33
│ │ │ -
│ │ │ -
52class VariableSlots : public FastMap<Key, FastVector<size_t> > {
│ │ │ -
53
│ │ │ -
54public:
│ │ │ -
55
│ │ │ - │ │ │ -
57 GTSAM_EXPORT static const size_t Empty;
│ │ │ -
58
│ │ │ -
61
│ │ │ -
67 template<class FG>
│ │ │ -
68 VariableSlots(const FG& factorGraph);
│ │ │ -
69
│ │ │ -
71
│ │ │ -
74
│ │ │ -
76 GTSAM_EXPORT void print(const std::string& str = "VariableSlots: ") const;
│ │ │ -
77
│ │ │ -
79 GTSAM_EXPORT bool equals(const VariableSlots& rhs, double tol = 0.0) const;
│ │ │ -
80
│ │ │ -
82};
│ │ │ -
│ │ │ -
83
│ │ │ -
85template<> struct traits<VariableSlots> : public Testable<VariableSlots> {};
│ │ │ -
86
│ │ │ -
87/* ************************************************************************* */
│ │ │ -
88template<class FG>
│ │ │ -
│ │ │ -
89VariableSlots::VariableSlots(const FG& factorGraph)
│ │ │ -
90{
│ │ │ -
91 gttic(VariableSlots_constructor);
│ │ │ -
92 static const bool debug = false;
│ │ │ -
93
│ │ │ -
94 // Compute a mapping (called variableSlots) *from* each involved
│ │ │ -
95 // variable that will be in the new joint factor *to* the slot in each
│ │ │ -
96 // removed factor in which that variable appears. For each variable,
│ │ │ -
97 // this is stored as a vector of slot numbers, stored in order of the
│ │ │ -
98 // removed factors. The slot number is the max integer value if the
│ │ │ -
99 // factor does not involve that variable.
│ │ │ -
100 size_t jointFactorPos = 0;
│ │ │ -
101 for(const typename FG::sharedFactor& factor: factorGraph) {
│ │ │ -
102 if (!factor) {
│ │ │ -
103 continue;
│ │ │ -
104 }
│ │ │ -
105 size_t factorVarSlot = 0;
│ │ │ -
106 for(const Key involvedVariable: *factor) {
│ │ │ -
107 // Set the slot in this factor for this variable. If the
│ │ │ -
108 // variable was not already discovered, create an array for it
│ │ │ -
109 // that we'll fill with the slot indices for each factor that
│ │ │ -
110 // we're combining. Initially we put the max integer value in
│ │ │ -
111 // the array entry for each factor that will indicate the factor
│ │ │ -
112 // does not involve the variable.
│ │ │ -
113 iterator thisVarSlots; bool inserted;
│ │ │ -
114 boost::tie(thisVarSlots, inserted) = this->insert(std::make_pair(involvedVariable, FastVector<size_t>()));
│ │ │ -
115 if(inserted)
│ │ │ -
116 thisVarSlots->second.resize(factorGraph.nrFactors(), Empty);
│ │ │ -
117 thisVarSlots->second[jointFactorPos] = factorVarSlot;
│ │ │ -
118 if(debug) std::cout << " var " << involvedVariable << " rowblock " << jointFactorPos << " comes from factor's slot " << factorVarSlot << std::endl;
│ │ │ -
119 ++ factorVarSlot;
│ │ │ -
120 }
│ │ │ -
121 ++ jointFactorPos;
│ │ │ -
122 }
│ │ │ -
123}
│ │ │ -
│ │ │ -
124
│ │ │ -
125}
│ │ │ -
Timing utilities.
│ │ │ -
Concept check for values that can be used in unit tests.
│ │ │ -
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ -
A thin wrapper around std::map that uses boost's fast_pool_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
│ │ │ + │ │ │ +
22
│ │ │ +
23#include <cmath>
│ │ │ +
24#include <iostream>
│ │ │ +
25
│ │ │ +
26namespace gtsam {
│ │ │ +
27
│ │ │ +
28/* ************************************************************************* */
│ │ │ +
29template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
31 const std::string& s, const KeyFormatter& formatter) const {
│ │ │ +
32 std::cout << s << " P(";
│ │ │ +
33 for (Key key : frontals()) std::cout << " " << formatter(key);
│ │ │ +
34 if (nrParents() > 0) std::cout << " |";
│ │ │ +
35 for (Key parent : parents()) std::cout << " " << formatter(parent);
│ │ │ +
36 std::cout << ")" << std::endl;
│ │ │ +
37}
│ │ │ +
│ │ │ +
38
│ │ │ +
39/* ************************************************************************* */
│ │ │ +
40template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
42 double tol) const {
│ │ │ +
43 return nrFrontals_ == c.nrFrontals_;
│ │ │ +
44}
│ │ │ +
│ │ │ +
45
│ │ │ +
46/* ************************************************************************* */
│ │ │ +
47template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
49 const HybridValues& c) const {
│ │ │ +
50 throw std::runtime_error("Conditional::logProbability is not implemented");
│ │ │ +
51}
│ │ │ +
│ │ │ +
52
│ │ │ +
53/* ************************************************************************* */
│ │ │ +
54template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
56 const HybridValues& c) const {
│ │ │ +
57 throw std::runtime_error("Conditional::evaluate is not implemented");
│ │ │ +
58}
│ │ │ +
│ │ │ +
59
│ │ │ +
60/* ************************************************************************* */
│ │ │ +
61template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
63 const {
│ │ │ +
64 throw std::runtime_error(
│ │ │ +
65 "Conditional::logNormalizationConstant is not implemented");
│ │ │ +
66}
│ │ │ +
│ │ │ +
67
│ │ │ +
68/* ************************************************************************* */
│ │ │ +
69template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
│ │ │ + │ │ │ +
71 return std::exp(logNormalizationConstant());
│ │ │ +
72}
│ │ │ +
│ │ │ +
73
│ │ │ +
74/* ************************************************************************* */
│ │ │ +
75template <class FACTOR, class DERIVEDCONDITIONAL>
│ │ │ +
76template <class VALUES>
│ │ │ +
│ │ │ + │ │ │ +
78 const DERIVEDCONDITIONAL& conditional, const VALUES& values) {
│ │ │ +
79 const double prob_or_density = conditional.evaluate(values);
│ │ │ +
80 if (prob_or_density < 0.0) return false; // prob_or_density is negative.
│ │ │ +
81 if (std::abs(prob_or_density - conditional(values)) > 1e-9)
│ │ │ +
82 return false; // operator and evaluate differ
│ │ │ +
83 const double logProb = conditional.logProbability(values);
│ │ │ +
84 if (std::abs(prob_or_density - std::exp(logProb)) > 1e-9)
│ │ │ +
85 return false; // logProb is not consistent with prob_or_density
│ │ │ +
86 if (std::abs(conditional.logNormalizationConstant() -
│ │ │ +
87 std::log(conditional.normalizationConstant())) > 1e-9)
│ │ │ +
88 return false; // log normalization constant is not consistent with
│ │ │ +
89 // normalization constant
│ │ │ +
90 const double error = conditional.error(values);
│ │ │ +
91 if (error < 0.0) return false; // prob_or_density is negative.
│ │ │ +
92 const double expected = conditional.logNormalizationConstant() - error;
│ │ │ +
93 if (std::abs(logProb - expected) > 1e-9)
│ │ │ +
94 return false; // logProb is not consistent with error
│ │ │ +
95 return true;
│ │ │ +
96}
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ +
98} // namespace gtsam
│ │ │ +
│ │ │ +
Base class for conditional densities.
│ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │
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
│ │ │ -
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the defa...
Definition FastMap.h:38
│ │ │ -
Template to create a binary predicate.
Definition Testable.h:111
│ │ │ -
A helper that implements the traits interface for GTSAM types.
Definition Testable.h:151
│ │ │ -
A combined factor is assembled as one block of rows for each component factor.
Definition VariableSlots.h:52
│ │ │ -
GTSAM_EXPORT void print(const std::string &str="VariableSlots: ") const
print
Definition VariableSlots.cpp:29
│ │ │ -
VariableSlots(const FG &factorGraph)
Constructor from a set of factors to be combined.
Definition VariableSlots.h:89
│ │ │ +
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
│ │ │ +
HybridValues represents a collection of DiscreteValues and VectorValues.
Definition HybridValues.h:38
│ │ │ +
Definition Conditional.h:64
│ │ │ +
static bool CheckInvariants(const DERIVEDCONDITIONAL &conditional, const VALUES &x)
Check invariants of this conditional, given the values x.
Definition Conditional-inst.h:77
│ │ │ +
size_t nrFrontals_
The first nrFrontal variables are frontal and the rest are parents.
Definition Conditional.h:67
│ │ │ +
virtual double logNormalizationConstant() const
All conditional types need to implement a log normalization constant to make it such that error>=0.
Definition Conditional-inst.h:62
│ │ │ +
virtual double evaluate(const HybridValues &c) const
All conditional types need to implement an evaluate function, that yields a true probability.
Definition Conditional-inst.h:55
│ │ │ +
bool equals(const This &c, double tol=1e-9) const
check equality
Definition Conditional-inst.h:41
│ │ │ +
virtual double logProbability(const HybridValues &c) const
All conditional types need to implement a logProbability function, for which exp(logProbability(x)) =...
Definition Conditional-inst.h:48
│ │ │ +
double normalizationConstant() const
Non-virtual, exponentiate logNormalizationConstant.
Definition Conditional-inst.h:70
│ │ │ +
void print(const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const
print with optional formatter
Definition Conditional-inst.h:30
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,149 +1,167 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -VariableSlots.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_. │ │ │ │ +Conditional-inst.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// \callgraph │ │ │ │ 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#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_M_a_p_._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_/_b_a_s_e_/_t_i_m_i_n_g_._h> │ │ │ │ -25#include <_g_t_s_a_m_/_b_a_s_e_/_T_e_s_t_a_b_l_e_._h> │ │ │ │ -26 │ │ │ │ -27#include │ │ │ │ -28 │ │ │ │ -29#include │ │ │ │ -30#include │ │ │ │ -31 │ │ │ │ -32namespace _g_t_s_a_m { │ │ │ │ -33 │ │ │ │ -_5_2class _V_a_r_i_a_b_l_e_S_l_o_t_s : public _F_a_s_t_M_a_p > { │ │ │ │ -53 │ │ │ │ -54public: │ │ │ │ -55 │ │ │ │ -56 typedef _F_a_s_t_M_a_p_<_K_e_y_,_ _F_a_s_t_V_e_c_t_o_r_<_s_i_z_e___t_> > _B_a_s_e; │ │ │ │ -57 GTSAM_EXPORT static const size_t Empty; │ │ │ │ -58 │ │ │ │ -61 │ │ │ │ -67 template │ │ │ │ -68 _V_a_r_i_a_b_l_e_S_l_o_t_s(const FG& factorGraph); │ │ │ │ -69 │ │ │ │ -71 │ │ │ │ -74 │ │ │ │ -76 GTSAM_EXPORT void _p_r_i_n_t(const std::string& str = "VariableSlots: ") const; │ │ │ │ -77 │ │ │ │ -79 GTSAM_EXPORT bool _e_q_u_a_l_s(const _V_a_r_i_a_b_l_e_S_l_o_t_s& rhs, double tol = 0.0) const; │ │ │ │ -80 │ │ │ │ -82}; │ │ │ │ -83 │ │ │ │ -_8_5template<> struct _t_r_a_i_t_s<_V_a_r_i_a_b_l_e_S_l_o_t_s> : public _T_e_s_t_a_b_l_e {}; │ │ │ │ -86 │ │ │ │ -87/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -88template │ │ │ │ -_8_9_V_a_r_i_a_b_l_e_S_l_o_t_s_:_:_V_a_r_i_a_b_l_e_S_l_o_t_s(const FG& factorGraph) │ │ │ │ -90{ │ │ │ │ -91 gttic(VariableSlots_constructor); │ │ │ │ -92 static const bool debug = false; │ │ │ │ -93 │ │ │ │ -94 // Compute a mapping (called variableSlots) *from* each involved │ │ │ │ -95 // variable that will be in the new joint factor *to* the slot in each │ │ │ │ -96 // removed factor in which that variable appears. For each variable, │ │ │ │ -97 // this is stored as a vector of slot numbers, stored in order of the │ │ │ │ -98 // removed factors. The slot number is the max integer value if the │ │ │ │ -99 // factor does not involve that variable. │ │ │ │ -100 size_t jointFactorPos = 0; │ │ │ │ -101 for(const typename FG::sharedFactor& factor: factorGraph) { │ │ │ │ -102 if (!factor) { │ │ │ │ -103 continue; │ │ │ │ -104 } │ │ │ │ -105 size_t factorVarSlot = 0; │ │ │ │ -106 for(const _K_e_y involvedVariable: *factor) { │ │ │ │ -107 // Set the slot in this factor for this variable. If the │ │ │ │ -108 // variable was not already discovered, create an array for it │ │ │ │ -109 // that we'll fill with the slot indices for each factor that │ │ │ │ -110 // we're combining. Initially we put the max integer value in │ │ │ │ -111 // the array entry for each factor that will indicate the factor │ │ │ │ -112 // does not involve the variable. │ │ │ │ -113 iterator thisVarSlots; bool inserted; │ │ │ │ -114 boost::tie(thisVarSlots, inserted) = this->insert(std::make_pair │ │ │ │ -(involvedVariable, _F_a_s_t_V_e_c_t_o_r_<_s_i_z_e___t_>())); │ │ │ │ -115 if(inserted) │ │ │ │ -116 thisVarSlots->second.resize(factorGraph.nrFactors(), Empty); │ │ │ │ -117 thisVarSlots->second[jointFactorPos] = factorVarSlot; │ │ │ │ -118 if(debug) std::cout << " var " << involvedVariable << " rowblock " << │ │ │ │ -jointFactorPos << " comes from factor's slot " << factorVarSlot << std::endl; │ │ │ │ -119 ++ factorVarSlot; │ │ │ │ -120 } │ │ │ │ -121 ++ jointFactorPos; │ │ │ │ -122 } │ │ │ │ -123} │ │ │ │ -124 │ │ │ │ -125} │ │ │ │ -_t_i_m_i_n_g_._h │ │ │ │ -Timing utilities. │ │ │ │ -_T_e_s_t_a_b_l_e_._h │ │ │ │ -Concept check for values that can be used in unit tests. │ │ │ │ -_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_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_:_:_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 │ │ │ │ +21#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> │ │ │ │ +22 │ │ │ │ +23#include │ │ │ │ +24#include │ │ │ │ +25 │ │ │ │ +26namespace _g_t_s_a_m { │ │ │ │ +27 │ │ │ │ +28/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +29template │ │ │ │ +_3_0void _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>_:_:_p_r_i_n_t( │ │ │ │ +31 const std::string& s, const _K_e_y_F_o_r_m_a_t_t_e_r& formatter) const { │ │ │ │ +32 std::cout << s << " P("; │ │ │ │ +33 for (_K_e_y key : frontals()) std::cout << " " << formatter(key); │ │ │ │ +34 if (nrParents() > 0) std::cout << " |"; │ │ │ │ +35 for (_K_e_y parent : parents()) std::cout << " " << formatter(parent); │ │ │ │ +36 std::cout << ")" << std::endl; │ │ │ │ +37} │ │ │ │ +38 │ │ │ │ +39/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +40template │ │ │ │ +_4_1bool _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>_:_:_e_q_u_a_l_s(const _T_h_i_s& c, │ │ │ │ +42 double tol) const { │ │ │ │ +43 return nrFrontals_ == c._n_r_F_r_o_n_t_a_l_s__; │ │ │ │ +44} │ │ │ │ +45 │ │ │ │ +46/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +47template │ │ │ │ +_4_8double _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_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( │ │ │ │ +49 const _H_y_b_r_i_d_V_a_l_u_e_s& c) const { │ │ │ │ +50 throw std::runtime_error("Conditional::logProbability is not implemented"); │ │ │ │ +51} │ │ │ │ +52 │ │ │ │ +53/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +54template │ │ │ │ +_5_5double _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>_:_:_e_v_a_l_u_a_t_e( │ │ │ │ +56 const _H_y_b_r_i_d_V_a_l_u_e_s& c) const { │ │ │ │ +57 throw std::runtime_error("Conditional::evaluate is not implemented"); │ │ │ │ +58} │ │ │ │ +59 │ │ │ │ +60/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +61template │ │ │ │ +_6_2double _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_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() │ │ │ │ +63 const { │ │ │ │ +64 throw std::runtime_error( │ │ │ │ +65 "Conditional::logNormalizationConstant is not implemented"); │ │ │ │ +66} │ │ │ │ +67 │ │ │ │ +68/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +69template │ │ │ │ +_7_0double _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>_:_:_n_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t() const │ │ │ │ +{ │ │ │ │ +71 return std::exp(logNormalizationConstant()); │ │ │ │ +72} │ │ │ │ +73 │ │ │ │ +74/* ************************************************************************* │ │ │ │ +*/ │ │ │ │ +75template │ │ │ │ +76template │ │ │ │ +_7_7bool _C_o_n_d_i_t_i_o_n_a_l_<_F_A_C_T_O_R_,_ _D_E_R_I_V_E_D_C_O_N_D_I_T_I_O_N_A_L_>_:_:_C_h_e_c_k_I_n_v_a_r_i_a_n_t_s( │ │ │ │ +78 const DERIVEDCONDITIONAL& conditional, const VALUES& values) { │ │ │ │ +79 const double prob_or_density = conditional.evaluate(values); │ │ │ │ +80 if (prob_or_density < 0.0) return false; // prob_or_density is negative. │ │ │ │ +81 if (std::abs(prob_or_density - conditional(values)) > 1e-9) │ │ │ │ +82 return false; // operator and evaluate differ │ │ │ │ +83 const double logProb = conditional.logProbability(values); │ │ │ │ +84 if (std::abs(prob_or_density - std::exp(logProb)) > 1e-9) │ │ │ │ +85 return false; // logProb is not consistent with prob_or_density │ │ │ │ +86 if (std::abs(conditional.logNormalizationConstant() - │ │ │ │ +87 std::log(conditional.normalizationConstant())) > 1e-9) │ │ │ │ +88 return false; // log normalization constant is not consistent with │ │ │ │ +89 // normalization constant │ │ │ │ +90 const double error = conditional.error(values); │ │ │ │ +91 if (error < 0.0) return false; // prob_or_density is negative. │ │ │ │ +92 const double expected = conditional.logNormalizationConstant() - error; │ │ │ │ +93 if (std::abs(logProb - expected) > 1e-9) │ │ │ │ +94 return false; // logProb is not consistent with error │ │ │ │ +95 return true; │ │ │ │ +96} │ │ │ │ +_9_7 │ │ │ │ +98} // namespace gtsam │ │ │ │ +_C_o_n_d_i_t_i_o_n_a_l_._h │ │ │ │ +Base class for conditional densities. │ │ │ │ _g_t_s_a_m │ │ │ │ Global functions in a separate testing namespace. │ │ │ │ DDeeffiinniittiioonn chartTesting.h:28 │ │ │ │ _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_:_:_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_:_:_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_:_:_V_a_r_i_a_b_l_e_S_l_o_t_s │ │ │ │ -A combined factor is assembled as one block of rows for each component factor. │ │ │ │ -DDeeffiinniittiioonn VariableSlots.h:52 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_S_l_o_t_s_:_:_p_r_i_n_t │ │ │ │ -GTSAM_EXPORT void print(const std::string &str="VariableSlots: ") const │ │ │ │ -print │ │ │ │ -DDeeffiinniittiioonn VariableSlots.cpp:29 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_S_l_o_t_s_:_:_V_a_r_i_a_b_l_e_S_l_o_t_s │ │ │ │ -VariableSlots(const FG &factorGraph) │ │ │ │ -Constructor from a set of factors to be combined. │ │ │ │ -DDeeffiinniittiioonn VariableSlots.h:89 │ │ │ │ +_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_:_:_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 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_C_h_e_c_k_I_n_v_a_r_i_a_n_t_s │ │ │ │ +static bool CheckInvariants(const DERIVEDCONDITIONAL &conditional, const VALUES │ │ │ │ +&x) │ │ │ │ +Check invariants of this conditional, given the values x. │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:77 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_n_r_F_r_o_n_t_a_l_s__ │ │ │ │ +size_t nrFrontals_ │ │ │ │ +The first nrFrontal variables are frontal and the rest are parents. │ │ │ │ +DDeeffiinniittiioonn Conditional.h:67 │ │ │ │ +_g_t_s_a_m_:_:_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 │ │ │ │ +virtual double logNormalizationConstant() const │ │ │ │ +All conditional types need to implement a log normalization constant to make it │ │ │ │ +such that error>=0. │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:62 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_e_v_a_l_u_a_t_e │ │ │ │ +virtual double evaluate(const HybridValues &c) const │ │ │ │ +All conditional types need to implement an evaluate function, that yields a │ │ │ │ +true probability. │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:55 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_e_q_u_a_l_s │ │ │ │ +bool equals(const This &c, double tol=1e-9) const │ │ │ │ +check equality │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:41 │ │ │ │ +_g_t_s_a_m_:_:_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 │ │ │ │ +virtual double logProbability(const HybridValues &c) const │ │ │ │ +All conditional types need to implement a logProbability function, for which │ │ │ │ +exp(logProbability(x)) =... │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:48 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_n_o_r_m_a_l_i_z_a_t_i_o_n_C_o_n_s_t_a_n_t │ │ │ │ +double normalizationConstant() const │ │ │ │ +Non-virtual, exponentiate logNormalizationConstant. │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:70 │ │ │ │ +_g_t_s_a_m_:_:_C_o_n_d_i_t_i_o_n_a_l_:_:_p_r_i_n_t │ │ │ │ +void print(const std::string &s="Conditional", const KeyFormatter │ │ │ │ +&formatter=DefaultKeyFormatter) const │ │ │ │ +print with optional formatter │ │ │ │ +DDeeffiinniittiioonn Conditional-inst.h:30 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_S_l_o_t_s_._h │ │ │ │ + * CCoonnddiittiioonnaall--iinnsstt..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/a00590.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableSlots.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/ISAM-inst.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,31 +95,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
VariableSlots.cpp File Reference
│ │ │ +
ISAM-inst.h File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

Incremental update functionality (iSAM) for BayesTree. │ │ │ +More...

│ │ │ + │ │ │ +

Go to the source code of this file.

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

│ │ │ Namespaces

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

Detailed Description

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

Incremental update functionality (iSAM) for BayesTree.

│ │ │ +
Author
Michael Kaess
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,21 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -VariableSlots.cpp File Reference │ │ │ │ +ISAM-inst.h File Reference │ │ │ │ +Incremental update functionality (iSAM) for BayesTree. _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. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Incremental update functionality (iSAM) for BayesTree. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ - Date │ │ │ │ - Oct 5, 2010 │ │ │ │ + Michael Kaess │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_S_l_o_t_s_._c_p_p │ │ │ │ + * _I_S_A_M_-_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/a00593.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableIndex.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Symbol.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,44 +94,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
VariableIndex.h File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
Symbol.cpp File Reference
│ │ │ │ │ │
│ │ │ - │ │ │ -

Go to the source code of this file.

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

│ │ │ -Classes

class  gtsam::VariableIndex
 The VariableIndex class computes and stores the block column structure of a factor graph. More...
 
struct  gtsam::traits< VariableIndex >
 traits More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Functions

│ │ │ +GTSAM_EXPORT std::ostream & gtsam::operator<< (std::ostream &os, const Symbol &symbol)
 
│ │ │

Detailed Description

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
March 26, 2013
│ │ │ +
Date
June 9, 2012
│ │ │ +
Author
: Frank Dellaert
│ │ │ +
│ │ │ +: Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,25 @@ │ │ │ │ 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 │ │ │ │ -VariableIndex.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_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x │ │ │ │ -  The _V_a_r_i_a_b_l_e_I_n_d_e_x class computes and stores the block column structure │ │ │ │ - of a factor graph. _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ -struct   _g_t_s_a_m_:_:_t_r_a_i_t_s_<_ _V_a_r_i_a_b_l_e_I_n_d_e_x_ _> │ │ │ │ -  traits _M_o_r_e_._._. │ │ │ │ -  │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +Symbol.cpp File Reference │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +GTSAM_EXPORT std::ostream &  ggttssaamm::::ooppeerraattoorr<<<< (std::ostream &os, const _S_y_m_b_o_l │ │ │ │ + &_s_y_m_b_o_l) │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ - Author │ │ │ │ - Richard Roberts │ │ │ │ Date │ │ │ │ - March 26, 2013 │ │ │ │ + June 9, 2012 │ │ │ │ + Author │ │ │ │ + : Frank Dellaert │ │ │ │ + : Richard Roberts │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_I_n_d_e_x_._h │ │ │ │ + * _S_y_m_b_o_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/a00596.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableIndex.cpp File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/Factor.cpp File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -95,31 +95,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ Namespaces
│ │ │ -
VariableIndex.cpp File Reference
│ │ │ +
Factor.cpp File Reference
│ │ │
│ │ │
│ │ │ + │ │ │ +

The base class for all factors. │ │ │ +More...

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

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
March 26, 2013
│ │ │ +

The base class for all factors.

│ │ │ +
Author
Kai Ni
│ │ │ +
│ │ │ +Frank Dellaert
│ │ │ +
│ │ │ +Richard Roberts
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,22 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ _N_a_m_e_s_p_a_c_e_s │ │ │ │ -VariableIndex.cpp File Reference │ │ │ │ +Factor.cpp File Reference │ │ │ │ +The base class for all factors. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +The base class for all factors. │ │ │ │ Author │ │ │ │ + Kai Ni │ │ │ │ + Frank Dellaert │ │ │ │ Richard Roberts │ │ │ │ - Date │ │ │ │ - March 26, 2013 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_I_n_d_e_x_._c_p_p │ │ │ │ + * _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/a00599.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableIndex-inl.h File Reference │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/DotWriter.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -94,34 +94,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces
│ │ │ -
VariableIndex-inl.h File Reference
│ │ │ +
DotWriter.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │ +

Graphviz formatter. │ │ │ +More...

│ │ │ + │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

struct  gtsam::DotWriter
 DotWriter is a helper class for writing graphviz .dot files. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

Detailed Description

│ │ │ -
Author
Richard Roberts
│ │ │ -
Date
March 26, 2013
│ │ │ +

Graphviz formatter.

│ │ │ +
Author
Frank Dellaert
│ │ │ +
Date
December, 2021
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,27 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -_N_a_m_e_s_p_a_c_e_s │ │ │ │ -VariableIndex-inl.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +DotWriter.h File Reference │ │ │ │ +Graphviz formatter. _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_:_:_D_o_t_W_r_i_t_e_r │ │ │ │ +  _D_o_t_W_r_i_t_e_r is a helper class for writing graphviz .dot files. _M_o_r_e_._._. │ │ │ │ +  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _g_t_s_a_m │ │ │ │   Global functions in a separate testing namespace. │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ +Graphviz formatter. │ │ │ │ Author │ │ │ │ - Richard Roberts │ │ │ │ + Frank Dellaert │ │ │ │ Date │ │ │ │ - March 26, 2013 │ │ │ │ + December, 2021 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_I_n_d_e_x_-_i_n_l_._h │ │ │ │ + * _D_o_t_W_r_i_t_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/a00599_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/VariableIndex-inl.h Source File │ │ │ +gtsam: /build/reproducible-path/gtsam-4.2.0+dfsg/gtsam/inference/DotWriter.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -98,125 +98,108 @@ │ │ │
No Matches
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ -
VariableIndex-inl.h
│ │ │ +
DotWriter.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
│ │ │
2
│ │ │ -
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
│ │ │ +
3 * GTSAM Copyright 2010-2021, 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#include <gtsam/base/timing.h>
│ │ │ -
22
│ │ │ -
23namespace gtsam {
│ │ │ +
19#pragma once
│ │ │ +
20
│ │ │ + │ │ │ +
22#include <gtsam/base/Vector.h>
│ │ │ +
23#include <gtsam/inference/Key.h>
│ │ │
24
│ │ │ -
25/* ************************************************************************* */
│ │ │ -
26template<class FG>
│ │ │ -
│ │ │ -
27void VariableIndex::augment(const FG& factors,
│ │ │ -
28 boost::optional<const FactorIndices&> newFactorIndices) {
│ │ │ -
29 gttic(VariableIndex_augment);
│ │ │ +
25#include <iosfwd>
│ │ │ +
26#include <map>
│ │ │ +
27#include <set>
│ │ │ +
28
│ │ │ +
29namespace gtsam {
│ │ │
30
│ │ │ -
31 // Augment index for each factor
│ │ │ -
32 for (size_t i = 0; i < factors.size(); ++i) {
│ │ │ -
33 if (factors[i]) {
│ │ │ -
34 const size_t globalI =
│ │ │ -
35 newFactorIndices ? (*newFactorIndices)[i] : nFactors_;
│ │ │ -
36 for(const Key key: *factors[i]) {
│ │ │ -
37 index_[key].push_back(globalI);
│ │ │ -
38 ++nEntries_;
│ │ │ -
39 }
│ │ │ -
40 }
│ │ │ -
41
│ │ │ -
42 // Increment factor count even if factors are null, to keep indices consistent
│ │ │ -
43 if (newFactorIndices) {
│ │ │ -
44 if ((*newFactorIndices)[i] >= nFactors_)
│ │ │ -
45 nFactors_ = (*newFactorIndices)[i] + 1;
│ │ │ -
46 } else {
│ │ │ -
47 ++nFactors_;
│ │ │ -
48 }
│ │ │ -
49 }
│ │ │ -
50}
│ │ │ -
│ │ │ -
51
│ │ │ -
52/* ************************************************************************* */
│ │ │ -
53template<typename ITERATOR, class FG>
│ │ │ -
│ │ │ -
54void VariableIndex::remove(ITERATOR firstFactor, ITERATOR lastFactor,
│ │ │ -
55 const FG& factors) {
│ │ │ -
56 gttic(VariableIndex_remove);
│ │ │ -
57
│ │ │ -
58 // NOTE: We intentionally do not decrement nFactors_ because the factor
│ │ │ -
59 // indices need to remain consistent. Removing factors from a factor graph
│ │ │ -
60 // does not shift the indices of other factors. Also, we keep nFactors_
│ │ │ -
61 // one greater than the highest-numbered factor referenced in a VariableIndex.
│ │ │ -
62 ITERATOR factorIndex = firstFactor;
│ │ │ -
63 size_t i = 0;
│ │ │ -
64 for (; factorIndex != lastFactor; ++factorIndex, ++i) {
│ │ │ -
65 if (i >= factors.size())
│ │ │ -
66 throw std::invalid_argument(
│ │ │ -
67 "Internal error, requested inconsistent number of factor indices and factors in VariableIndex::remove");
│ │ │ -
68 if (factors[i]) {
│ │ │ -
69 for(Key j: *factors[i]) {
│ │ │ -
70 FactorIndices& factorEntries = internalAt(j);
│ │ │ -
71 auto entry = std::find(factorEntries.begin(),
│ │ │ -
72 factorEntries.end(), *factorIndex);
│ │ │ -
73 if (entry == factorEntries.end())
│ │ │ -
74 throw std::invalid_argument(
│ │ │ -
75 "Internal error, indices and factors passed into VariableIndex::remove are not consistent with the existing variable index");
│ │ │ -
76 factorEntries.erase(entry);
│ │ │ -
77 --nEntries_;
│ │ │ -
78 }
│ │ │ -
79 }
│ │ │ -
80 }
│ │ │ -
81}
│ │ │ -
│ │ │ -
82
│ │ │ -
83/* ************************************************************************* */
│ │ │ -
84template<typename ITERATOR>
│ │ │ -
│ │ │ -
85void VariableIndex::removeUnusedVariables(ITERATOR firstKey, ITERATOR lastKey) {
│ │ │ -
86 for (ITERATOR key = firstKey; key != lastKey; ++key) {
│ │ │ -
87 KeyMap::iterator entry = index_.find(*key);
│ │ │ -
88 if (!entry->second.empty())
│ │ │ -
89 throw std::invalid_argument(
│ │ │ -
90 "Asking to remove variables from the variable index that are not unused");
│ │ │ -
91 index_.erase(entry);
│ │ │ -
92 }
│ │ │ -
93}
│ │ │ -
│ │ │ -
94
│ │ │ -
95}
│ │ │ -
Timing utilities.
│ │ │ - │ │ │ +
│ │ │ +
35struct GTSAM_EXPORT DotWriter {
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
42
│ │ │ +
47 std::map<Key, Vector2> variablePositions;
│ │ │ +
48
│ │ │ +
54 std::map<char, double> positionHints;
│ │ │ +
55
│ │ │ +
57 std::set<Key> boxes;
│ │ │ +
58
│ │ │ +
63 std::map<size_t, Vector2> factorPositions;
│ │ │ +
64
│ │ │ +
65 explicit DotWriter(double figureWidthInches = 5,
│ │ │ +
66 double figureHeightInches = 5,
│ │ │ +
67 bool plotFactorPoints = true,
│ │ │ +
68 bool connectKeysToFactor = true, bool binaryEdges = false)
│ │ │ +
69 : figureWidthInches(figureWidthInches),
│ │ │ +
70 figureHeightInches(figureHeightInches),
│ │ │ +
71 plotFactorPoints(plotFactorPoints),
│ │ │ +
72 connectKeysToFactor(connectKeysToFactor),
│ │ │ +
73 binaryEdges(binaryEdges) {}
│ │ │ +
74
│ │ │ +
76 void graphPreamble(std::ostream* os) const;
│ │ │ +
77
│ │ │ +
79 void digraphPreamble(std::ostream* os) const;
│ │ │ +
80
│ │ │ +
82 void drawVariable(Key key, const KeyFormatter& keyFormatter,
│ │ │ +
83 const boost::optional<Vector2>& position,
│ │ │ +
84 std::ostream* os) const;
│ │ │ +
85
│ │ │ +
87 static void DrawFactor(size_t i, const boost::optional<Vector2>& position,
│ │ │ +
88 std::ostream* os);
│ │ │ +
89
│ │ │ +
91 boost::optional<Vector2> variablePos(Key key) const;
│ │ │ +
92
│ │ │ +
94 void processFactor(size_t i, const KeyVector& keys,
│ │ │ +
95 const KeyFormatter& keyFormatter,
│ │ │ +
96 const boost::optional<Vector2>& position,
│ │ │ +
97 std::ostream* os) const;
│ │ │ +
98};
│ │ │ +
│ │ │ +
99
│ │ │ +
100} // namespace gtsam
│ │ │ +
A thin wrapper around std::vector that uses a custom allocator.
│ │ │ +
typedef and functions to augment Eigen's VectorXd
│ │ │ + │ │ │
Global functions in a separate testing namespace.
Definition chartTesting.h:28
│ │ │ -
FastVector< FactorIndex > FactorIndices
Define collection types:
Definition Factor.h:34
│ │ │ +
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:86
│ │ │
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
│ │ │ -
const FactorIndices & internalAt(Key variable) const
Internal version of 'at' that asserts existence.
Definition VariableIndex.h:172
│ │ │ -
void remove(ITERATOR firstFactor, ITERATOR lastFactor, const FG &factors)
Remove entries corresponding to the specified factors.
Definition VariableIndex-inl.h:54
│ │ │ -
void removeUnusedVariables(ITERATOR firstKey, ITERATOR lastKey)
Remove unused empty variables (in debug mode verifies they are empty).
Definition VariableIndex-inl.h:85
│ │ │ -
void augment(const FG &factors, boost::optional< const FactorIndices & > newFactorIndices=boost::none)
Augment the variable index with new factors.
Definition VariableIndex-inl.h:27
│ │ │ +
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
│ │ │ +
DotWriter is a helper class for writing graphviz .dot files.
Definition DotWriter.h:35
│ │ │ +
double figureWidthInches
The figure width on paper in inches.
Definition DotWriter.h:36
│ │ │ +
bool plotFactorPoints
Plots each factor as a dot between the variables.
Definition DotWriter.h:38
│ │ │ +
bool connectKeysToFactor
Draw a line from each key within a factor to the dot of the factor.
Definition DotWriter.h:39
│ │ │ +
std::map< Key, Vector2 > variablePositions
Variable positions can be optionally specified and will be included in the dot file with a "!...
Definition DotWriter.h:47
│ │ │ +
bool binaryEdges
just use non-dotted edges for binary factors
Definition DotWriter.h:41
│ │ │ +
std::map< char, double > positionHints
The position hints allow one to use symbol character and index to specify position.
Definition DotWriter.h:54
│ │ │ +
std::set< Key > boxes
A set of keys that will be displayed as a box.
Definition DotWriter.h:57
│ │ │ +
std::map< size_t, Vector2 > factorPositions
Factor positions can be optionally specified and will be included in the dot file with a "!...
Definition DotWriter.h:63
│ │ │ +
double figureHeightInches
The figure height on paper in inches.
Definition DotWriter.h:37
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,141 +1,143 @@ │ │ │ │ gtsam 4.2.0 │ │ │ │ gtsam │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ -VariableIndex-inl.h │ │ │ │ +DotWriter.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 2010-2021, 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_/_i_n_f_e_r_e_n_c_e_/_V_a_r_i_a_b_l_e_I_n_d_e_x_._h> │ │ │ │ -21#include <_g_t_s_a_m_/_b_a_s_e_/_t_i_m_i_n_g_._h> │ │ │ │ -22 │ │ │ │ -23namespace _g_t_s_a_m { │ │ │ │ +19#pragma once │ │ │ │ +20 │ │ │ │ +21#include <_g_t_s_a_m_/_b_a_s_e_/_F_a_s_t_V_e_c_t_o_r_._h> │ │ │ │ +22#include <_g_t_s_a_m_/_b_a_s_e_/_V_e_c_t_o_r_._h> │ │ │ │ +23#include <_g_t_s_a_m_/_i_n_f_e_r_e_n_c_e_/_K_e_y_._h> │ │ │ │ 24 │ │ │ │ -25/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -26template │ │ │ │ -_2_7void _V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_a_u_g_m_e_n_t(const FG& factors, │ │ │ │ -28 boost::optional newFactorIndices) { │ │ │ │ -29 gttic(VariableIndex_augment); │ │ │ │ +25#include │ │ │ │ +26#include │ │ │ │ +27#include │ │ │ │ +28 │ │ │ │ +29namespace _g_t_s_a_m { │ │ │ │ 30 │ │ │ │ -31 // Augment index for each factor │ │ │ │ -32 for (size_t i = 0; i < factors.size(); ++i) { │ │ │ │ -33 if (factors[i]) { │ │ │ │ -34 const size_t globalI = │ │ │ │ -35 newFactorIndices ? (*newFactorIndices)[i] : nFactors_; │ │ │ │ -36 for(const _K_e_y key: *factors[i]) { │ │ │ │ -37 index_[key].push_back(globalI); │ │ │ │ -38 ++nEntries_; │ │ │ │ -39 } │ │ │ │ -40 } │ │ │ │ -41 │ │ │ │ -42 // Increment factor count even if factors are null, to keep indices │ │ │ │ -consistent │ │ │ │ -43 if (newFactorIndices) { │ │ │ │ -44 if ((*newFactorIndices)[i] >= nFactors_) │ │ │ │ -45 nFactors_ = (*newFactorIndices)[i] + 1; │ │ │ │ -46 } else { │ │ │ │ -47 ++nFactors_; │ │ │ │ -48 } │ │ │ │ -49 } │ │ │ │ -50} │ │ │ │ -51 │ │ │ │ -52/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -53template │ │ │ │ -_5_4void _V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_r_e_m_o_v_e(ITERATOR firstFactor, ITERATOR lastFactor, │ │ │ │ -55 const FG& factors) { │ │ │ │ -56 gttic(VariableIndex_remove); │ │ │ │ -57 │ │ │ │ -58 // NOTE: We intentionally do not decrement nFactors_ because the factor │ │ │ │ -59 // indices need to remain consistent. Removing factors from a factor graph │ │ │ │ -60 // does not shift the indices of other factors. Also, we keep nFactors_ │ │ │ │ -61 // one greater than the highest-numbered factor referenced in a │ │ │ │ -VariableIndex. │ │ │ │ -62 ITERATOR factorIndex = firstFactor; │ │ │ │ -63 size_t i = 0; │ │ │ │ -64 for (; factorIndex != lastFactor; ++factorIndex, ++i) { │ │ │ │ -65 if (i >= factors.size()) │ │ │ │ -66 throw std::invalid_argument( │ │ │ │ -67 "Internal error, requested inconsistent number of factor indices and factors │ │ │ │ -in VariableIndex::remove"); │ │ │ │ -68 if (factors[i]) { │ │ │ │ -69 for(_K_e_y j: *factors[i]) { │ │ │ │ -70 _F_a_c_t_o_r_I_n_d_i_c_e_s& factorEntries = _i_n_t_e_r_n_a_l_A_t(j); │ │ │ │ -71 auto entry = std::find(factorEntries.begin(), │ │ │ │ -72 factorEntries.end(), *factorIndex); │ │ │ │ -73 if (entry == factorEntries.end()) │ │ │ │ -74 throw std::invalid_argument( │ │ │ │ -75 "Internal error, indices and factors passed into VariableIndex::remove are │ │ │ │ -not consistent with the existing variable index"); │ │ │ │ -76 factorEntries.erase(entry); │ │ │ │ -77 --nEntries_; │ │ │ │ -78 } │ │ │ │ -79 } │ │ │ │ -80 } │ │ │ │ -81} │ │ │ │ -82 │ │ │ │ -83/* ************************************************************************* │ │ │ │ -*/ │ │ │ │ -84template │ │ │ │ -_8_5void _V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_r_e_m_o_v_e_U_n_u_s_e_d_V_a_r_i_a_b_l_e_s(ITERATOR firstKey, ITERATOR │ │ │ │ -lastKey) { │ │ │ │ -86 for (ITERATOR key = firstKey; key != lastKey; ++key) { │ │ │ │ -87 KeyMap::iterator entry = index_.find(*key); │ │ │ │ -88 if (!entry->second.empty()) │ │ │ │ -89 throw std::invalid_argument( │ │ │ │ -90 "Asking to remove variables from the variable index that are not unused"); │ │ │ │ -91 index_.erase(entry); │ │ │ │ -92 } │ │ │ │ -93} │ │ │ │ -94 │ │ │ │ -95} │ │ │ │ -_t_i_m_i_n_g_._h │ │ │ │ -Timing utilities. │ │ │ │ -_V_a_r_i_a_b_l_e_I_n_d_e_x_._h │ │ │ │ +_3_5struct GTSAM_EXPORT _D_o_t_W_r_i_t_e_r { │ │ │ │ +_3_6 double _f_i_g_u_r_e_W_i_d_t_h_I_n_c_h_e_s; │ │ │ │ +_3_7 double _f_i_g_u_r_e_H_e_i_g_h_t_I_n_c_h_e_s; │ │ │ │ +_3_8 bool _p_l_o_t_F_a_c_t_o_r_P_o_i_n_t_s; │ │ │ │ +_3_9 bool _c_o_n_n_e_c_t_K_e_y_s_T_o_F_a_c_t_o_r; │ │ │ │ +_4_1 bool _b_i_n_a_r_y_E_d_g_e_s; │ │ │ │ +42 │ │ │ │ +_4_7 std::map _v_a_r_i_a_b_l_e_P_o_s_i_t_i_o_n_s; │ │ │ │ +48 │ │ │ │ +_5_4 std::map _p_o_s_i_t_i_o_n_H_i_n_t_s; │ │ │ │ +55 │ │ │ │ +_5_7 std::set _b_o_x_e_s; │ │ │ │ +58 │ │ │ │ +_6_3 std::map _f_a_c_t_o_r_P_o_s_i_t_i_o_n_s; │ │ │ │ +64 │ │ │ │ +65 explicit _D_o_t_W_r_i_t_e_r(double figureWidthInches = 5, │ │ │ │ +66 double figureHeightInches = 5, │ │ │ │ +67 bool plotFactorPoints = true, │ │ │ │ +68 bool connectKeysToFactor = true, bool binaryEdges = false) │ │ │ │ +69 : figureWidthInches(figureWidthInches), │ │ │ │ +70 figureHeightInches(figureHeightInches), │ │ │ │ +71 plotFactorPoints(plotFactorPoints), │ │ │ │ +72 connectKeysToFactor(connectKeysToFactor), │ │ │ │ +73 binaryEdges(binaryEdges) {} │ │ │ │ +74 │ │ │ │ +76 void graphPreamble(std::ostream* os) const; │ │ │ │ +77 │ │ │ │ +79 void digraphPreamble(std::ostream* os) const; │ │ │ │ +80 │ │ │ │ +82 void drawVariable(_K_e_y key, const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter, │ │ │ │ +83 const boost::optional& position, │ │ │ │ +84 std::ostream* os) const; │ │ │ │ +85 │ │ │ │ +87 static void DrawFactor(size_t i, const boost::optional& position, │ │ │ │ +88 std::ostream* os); │ │ │ │ +89 │ │ │ │ +91 boost::optional variablePos(_K_e_y key) const; │ │ │ │ +92 │ │ │ │ +94 void processFactor(size_t i, const _K_e_y_V_e_c_t_o_r& keys, │ │ │ │ +95 const _K_e_y_F_o_r_m_a_t_t_e_r& keyFormatter, │ │ │ │ +96 const boost::optional& position, │ │ │ │ +97 std::ostream* os) const; │ │ │ │ +98}; │ │ │ │ +99 │ │ │ │ +100} // namespace gtsam │ │ │ │ +_F_a_s_t_V_e_c_t_o_r_._h │ │ │ │ +A thin wrapper around std::vector that uses a custom allocator. │ │ │ │ +_V_e_c_t_o_r_._h │ │ │ │ +typedef and functions to augment Eigen's VectorXd │ │ │ │ +_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_:_:_F_a_c_t_o_r_I_n_d_i_c_e_s │ │ │ │ -FastVector< FactorIndex > FactorIndices │ │ │ │ -Define collection types: │ │ │ │ -DDeeffiinniittiioonn Factor.h:34 │ │ │ │ +_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_:_:_K_e_y │ │ │ │ std::uint64_t Key │ │ │ │ Integer nonlinear key type. │ │ │ │ DDeeffiinniittiioonn types.h:100 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_i_n_t_e_r_n_a_l_A_t │ │ │ │ -const FactorIndices & internalAt(Key variable) const │ │ │ │ -Internal version of 'at' that asserts existence. │ │ │ │ -DDeeffiinniittiioonn VariableIndex.h:172 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_r_e_m_o_v_e │ │ │ │ -void remove(ITERATOR firstFactor, ITERATOR lastFactor, const FG &factors) │ │ │ │ -Remove entries corresponding to the specified factors. │ │ │ │ -DDeeffiinniittiioonn VariableIndex-inl.h:54 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_r_e_m_o_v_e_U_n_u_s_e_d_V_a_r_i_a_b_l_e_s │ │ │ │ -void removeUnusedVariables(ITERATOR firstKey, ITERATOR lastKey) │ │ │ │ -Remove unused empty variables (in debug mode verifies they are empty). │ │ │ │ -DDeeffiinniittiioonn VariableIndex-inl.h:85 │ │ │ │ -_g_t_s_a_m_:_:_V_a_r_i_a_b_l_e_I_n_d_e_x_:_:_a_u_g_m_e_n_t │ │ │ │ -void augment(const FG &factors, boost::optional< const FactorIndices & > │ │ │ │ -newFactorIndices=boost::none) │ │ │ │ -Augment the variable index with new factors. │ │ │ │ -DDeeffiinniittiioonn VariableIndex-inl.h:27 │ │ │ │ +_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_:_:_D_o_t_W_r_i_t_e_r │ │ │ │ +DotWriter is a helper class for writing graphviz .dot files. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:35 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_f_i_g_u_r_e_W_i_d_t_h_I_n_c_h_e_s │ │ │ │ +double figureWidthInches │ │ │ │ +The figure width on paper in inches. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:36 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_p_l_o_t_F_a_c_t_o_r_P_o_i_n_t_s │ │ │ │ +bool plotFactorPoints │ │ │ │ +Plots each factor as a dot between the variables. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:38 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_c_o_n_n_e_c_t_K_e_y_s_T_o_F_a_c_t_o_r │ │ │ │ +bool connectKeysToFactor │ │ │ │ +Draw a line from each key within a factor to the dot of the factor. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:39 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_v_a_r_i_a_b_l_e_P_o_s_i_t_i_o_n_s │ │ │ │ +std::map< Key, Vector2 > variablePositions │ │ │ │ +Variable positions can be optionally specified and will be included in the dot │ │ │ │ +file with a "!... │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:47 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_b_i_n_a_r_y_E_d_g_e_s │ │ │ │ +bool binaryEdges │ │ │ │ +just use non-dotted edges for binary factors │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:41 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_p_o_s_i_t_i_o_n_H_i_n_t_s │ │ │ │ +std::map< char, double > positionHints │ │ │ │ +The position hints allow one to use symbol character and index to specify │ │ │ │ +position. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:54 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_b_o_x_e_s │ │ │ │ +std::set< Key > boxes │ │ │ │ +A set of keys that will be displayed as a box. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:57 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_f_a_c_t_o_r_P_o_s_i_t_i_o_n_s │ │ │ │ +std::map< size_t, Vector2 > factorPositions │ │ │ │ +Factor positions can be optionally specified and will be included in the dot │ │ │ │ +file with a "!... │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:63 │ │ │ │ +_g_t_s_a_m_:_:_D_o_t_W_r_i_t_e_r_:_:_f_i_g_u_r_e_H_e_i_g_h_t_I_n_c_h_e_s │ │ │ │ +double figureHeightInches │ │ │ │ +The figure height on paper in inches. │ │ │ │ +DDeeffiinniittiioonn DotWriter.h:37 │ │ │ │ * _g_t_s_a_m │ │ │ │ * _i_n_f_e_r_e_n_c_e │ │ │ │ - * _V_a_r_i_a_b_l_e_I_n_d_e_x_-_i_n_l_._h │ │ │ │ + * _D_o_t_W_r_i_t_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/a00605.html │ │ │ @@ -1,15 +1,15 @@ │ │ │