Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use KeyVector for proper wrapping with TBB #603

Merged
merged 2 commits into from
Nov 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gtsam/sfm/MFAS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ MFAS::MFAS(const TranslationEdges& relativeTranslations,
}
}

vector<Key> MFAS::computeOrdering() const {
vector<Key> ordering; // Nodes in MFAS order (result).
KeyVector MFAS::computeOrdering() const {
KeyVector ordering; // Nodes in MFAS order (result).

// A graph is an unordered map from keys to nodes. Each node contains a list
// of its adjacent nodes. Create the graph from the edgeWeights.
Expand All @@ -140,7 +140,7 @@ vector<Key> MFAS::computeOrdering() const {

map<MFAS::KeyPair, double> MFAS::computeOutlierWeights() const {
// Find the ordering.
vector<Key> ordering = computeOrdering();
KeyVector ordering = computeOrdering();

// Create a map from the node key to its position in the ordering. This makes
// it easier to lookup positions of different nodes.
Expand Down
2 changes: 1 addition & 1 deletion gtsam/sfm/MFAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class MFAS {
* @brief Computes the 1D MFAS ordering of nodes in the graph
* @return orderedNodes: vector of nodes in the obtained order
*/
std::vector<Key> computeOrdering() const;
KeyVector computeOrdering() const;

/**
* @brief Computes the outlier weights of the graph. We define the outlier
Expand Down