Functions | Variables
testMFAS.cpp File Reference

Unit tests for the MFAS class. More...

#include <gtsam/sfm/MFAS.h>
#include <CppUnitLite/TestHarness.h>
Include dependency graph for testMFAS.cpp:

Go to the source code of this file.

Functions

map< MFAS::KeyPair, double > getEdgeWeights (const vector< MFAS::KeyPair > &edges, const vector< double > &weights)
 
int main ()
 
 TEST (MFAS, OrderingWeights1)
 
 TEST (MFAS, OrderingWeights2)
 

Variables

vector< MFAS::KeyPairedges
 
KeyVector nodes = {Key(0), Key(1), Key(2), Key(3)}
 
vector< double > weights1 = {2, 1.5, 0.5, 0.25, 1, 0.75}
 
vector< double > weights2 = {0.5, 0.75, -0.25, 0.75, 1, 0.5}
 

Detailed Description

Unit tests for the MFAS class.

Author
Akshay Krishnan
Date
July 2020

Definition in file testMFAS.cpp.

Function Documentation

◆ getEdgeWeights()

map<MFAS::KeyPair, double> getEdgeWeights ( const vector< MFAS::KeyPair > &  edges,
const vector< double > &  weights 
)

Definition at line 36 of file testMFAS.cpp.

◆ main()

int main ( )

Definition at line 100 of file testMFAS.cpp.

◆ TEST() [1/2]

TEST ( MFAS  ,
OrderingWeights1   
)

Definition at line 77 of file testMFAS.cpp.

◆ TEST() [2/2]

TEST ( MFAS  ,
OrderingWeights2   
)

Definition at line 47 of file testMFAS.cpp.

Variable Documentation

◆ edges

vector<MFAS::KeyPair> edges
Initial value:
= {make_pair(3, 2), make_pair(0, 1), make_pair(3, 1),
make_pair(1, 2), make_pair(0, 2), make_pair(3, 0)}

We (partially) use the example from the paper on 1dsfm (https://research.cs.cornell.edu/1dsfm/docs/1DSfM_ECCV14.pdf, Fig 1, Page 5) for the unit tests here. The only change is that we leave out node 4 and use only nodes 0-3. This makes the test easier to understand and also avoids an ambiguity in the ground truth ordering that arises due to insufficient edges in the geaph when using the 4th node.

Definition at line 25 of file testMFAS.cpp.

◆ nodes

KeyVector nodes = {Key(0), Key(1), Key(2), Key(3)}

Definition at line 28 of file testMFAS.cpp.

◆ weights1

vector<double> weights1 = {2, 1.5, 0.5, 0.25, 1, 0.75}

Definition at line 30 of file testMFAS.cpp.

◆ weights2

vector<double> weights2 = {0.5, 0.75, -0.25, 0.75, 1, 0.5}

Definition at line 32 of file testMFAS.cpp.



gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:25