MFAS.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010-2020, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
12 #pragma once
13 
21 #include <gtsam/geometry/Unit3.h>
22 #include <gtsam/inference/Key.h>
24 
25 #include <memory>
26 #include <unordered_map>
27 #include <vector>
28 
29 namespace gtsam {
30 
51 class GTSAM_EXPORT MFAS {
52  public:
53  // used to represent edges between two nodes in the graph. When used in
54  // translation averaging for global SfM
55  using KeyPair = std::pair<Key, Key>;
56  using TranslationEdges = std::vector<BinaryMeasurement<Unit3>>;
57 
58  private:
59  // edges with a direction such that all weights are positive
60  // i.e, edges that originally had negative weights are flipped
61  std::map<KeyPair, double> edgeWeights_;
62 
63  public:
69  MFAS(const std::map<KeyPair, double> &edgeWeights)
70  : edgeWeights_(edgeWeights) {}
71 
80  MFAS(const TranslationEdges &relativeTranslations,
81  const Unit3 &projectionDirection);
82 
87  KeyVector computeOrdering() const;
88 
96  std::map<KeyPair, double> computeOutlierWeights() const;
97 };
98 
99 typedef std::map<std::pair<Key, Key>, double> KeyPairDoubleMap;
100 
101 } // namespace gtsam
gtsam::MFAS
Definition: MFAS.h:51
gtsam::MFAS::MFAS
MFAS(const std::map< KeyPair, double > &edgeWeights)
Construct from the weighted directed edges between the nodes. Each node is identified by a Key.
Definition: MFAS.h:69
gtsam::MFAS::edgeWeights_
std::map< KeyPair, double > edgeWeights_
Definition: MFAS.h:61
gtsam::KeyVector
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:92
Unit3.h
Key.h
gtsam::MFAS::TranslationEdges
std::vector< BinaryMeasurement< Unit3 > > TranslationEdges
Definition: MFAS.h:56
gtsam::MFAS::KeyPair
std::pair< Key, Key > KeyPair
Definition: MFAS.h:55
gtsam
traits
Definition: SFMdata.h:40
BinaryMeasurement.h
Binary measurement represents a measurement between two keys in a graph. A binary measurement is simi...
gtsam::KeyPairDoubleMap
std::map< std::pair< Key, Key >, double > KeyPairDoubleMap
Definition: MFAS.h:99
gtsam::Unit3
Represents a 3D point on a unit sphere.
Definition: Unit3.h:42


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:22