8 #include <gtest/gtest.h>
10 #include <tracking/trackFindingCDC/ca/MultipassCellularPathFinder.h>
11 #include <tracking/trackFindingCDC/ca/WithAutomatonCell.h>
16 using namespace TrackFindingCDC;
18 TEST(TrackFindingCDCTest, CellularPathFollower_followSingle)
21 Element startElement(std::make_pair(1, 1));
22 startElement.getAutomatonCell().setCellWeight(1);
24 Element secondElement(std::make_pair(1, 1));
25 secondElement.getAutomatonCell().setCellWeight(1);
27 std::vector<WeightedRelation<Element>> relations;
28 relations.emplace_back(&startElement, 1, &secondElement);
31 startElement.getAutomatonCell().setStartFlag();
32 startElement.getAutomatonCell().setCellState(3);
33 startElement.getAutomatonCell().setAssignedFlag();
35 secondElement.getAutomatonCell().setCellState(1);
36 secondElement.getAutomatonCell().setAssignedFlag();
39 const std::vector<Element*> elementPath =
40 cellularPathFollower.
followSingle(&startElement, relations, -INFINITY);
41 EXPECT_EQ(2, elementPath.size());
42 EXPECT_EQ(&startElement, elementPath.front());
43 EXPECT_EQ(&secondElement, elementPath.back());
Implements to pick up of the highest value path in neighborhood Following high value paths can be don...
Path< ACellHolder > followSingle(ACellHolder *startCellHolder, const std::vector< WeightedRelation< ACellHolder >> &cellHolderRelations, Weight minStateToFollow=-INFINITY) const
Follows a single maximal path starting with the given start cell.
Mixin class to attach an automaton cell to an object or pointer.
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.