Initial interation on writing out MLD partition/cell data

This commit is contained in:
Michael Krasnyk
2017-02-23 16:39:29 +01:00
committed by Patrick Niklaus
parent 757e7ca936
commit ff0a98196f
15 changed files with 415 additions and 17 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(mutable_cell_storage)
auto graph = makeGraph(edges);
// test non-const storage
CellStorage storage(mlp, graph);
CellStorage<false> storage(mlp, graph);
// Level 1
auto cell_1_0 = storage.GetCell(1, 0);
@@ -250,7 +250,7 @@ BOOST_AUTO_TEST_CASE(immutable_cell_storage)
// 3/0: 3 : 1,0,1
// test const storage
const CellStorage const_storage(mlp, graph);
const CellStorage<false> const_storage(mlp, graph);
auto const_cell_1_0 = const_storage.GetCell(1, 0);
auto const_cell_1_1 = const_storage.GetCell(1, 1);
+1 -1
View File
@@ -24,7 +24,7 @@ BOOST_AUTO_TEST_CASE(packed_mlp)
std::vector<CellID> l2{{0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3}};
std::vector<CellID> l3{{0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1}};
std::vector<CellID> l4{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
PackedMultiLevelPartition mlp{{l1, l2, l3, l4}, {6, 4, 2, 1}};
PackedMultiLevelPartition<false> mlp{{l1, l2, l3, l4}, {6, 4, 2, 1}};
BOOST_CHECK_EQUAL(mlp.GetNumberOfCells(1), 6);
BOOST_CHECK_EQUAL(mlp.GetNumberOfCells(2), 4);