Unit tests for the MFAS class. More...
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, OrderingWeights2) | |
TEST (MFAS, OrderingWeights1) | |
Variables | |
vector< MFAS::KeyPair > | edges |
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} |
map<MFAS::KeyPair, double> getEdgeWeights | ( | const vector< MFAS::KeyPair > & | edges, |
const vector< double > & | weights | ||
) |
Definition at line 36 of file testMFAS.cpp.
int main | ( | void | ) |
Definition at line 100 of file testMFAS.cpp.
TEST | ( | MFAS | , |
OrderingWeights2 | |||
) |
Definition at line 47 of file testMFAS.cpp.
TEST | ( | MFAS | , |
OrderingWeights1 | |||
) |
Definition at line 77 of file testMFAS.cpp.
vector<MFAS::KeyPair> edges |
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.
vector<double> weights1 = {2, 1.5, 0.5, 0.25, 1, 0.75} |
Definition at line 30 of file testMFAS.cpp.
vector<double> weights2 = {0.5, 0.75, -0.25, 0.75, 1, 0.5} |
Definition at line 32 of file testMFAS.cpp.