10 #ifndef DS_AGGREGATOR_H
11 #define DS_AGGREGATOR_H
31 static std::vector<ds::AggregatedPerson> aggregateOffline(
const std::vector<ds::Person> & people );
33 void newDetections(
const std::vector<ds::Person> & people );
35 std::vector<ds::AggregatedPerson> getFinalizedAggregations(
bool clean =
true );
36 std::vector<ds::AggregatedPerson> getOngoingAggregations()
const;
37 std::vector<ds::AggregatedPerson> getAllAggregations()
const;
39 void cleanFinalizedAggregations() noexcept;
40 void cleanAll() noexcept;
44 std::unique_ptr<AggregatorImpl> mAggregatorImpl;
57 void newDetections(
const std::vector<ds::Person> & people );
59 std::vector<ds::AggregatedPerson> getAggregations( std::chrono::milliseconds windowDuration = std::chrono::milliseconds{ 0 } );
61 std::chrono::milliseconds getMaxWindowDuration()
const noexcept;
62 void setMaxWindowDuration( std::chrono::milliseconds maxWindowDuration ) noexcept;
64 void clean() noexcept;
67 class SlidingWindowAggregatorImpl;
68 std::unique_ptr<SlidingWindowAggregatorImpl> mSlidingWindowAggregatorImpl;
75 LastDetections( std::chrono::milliseconds maxWindowDuration = std::chrono::milliseconds{ 10000 } );
81 void newDetections(
const std::vector<ds::Person> & people );
83 std::vector<ds::Person> getLastDetections( std::chrono::milliseconds windowDuration = std::chrono::milliseconds{ 0 } );
85 std::chrono::milliseconds getMaxWindowDuration()
const noexcept;
86 void setMaxWindowDuration( std::chrono::milliseconds maxWindowDuration ) noexcept;
88 void clean() noexcept;
91 class LastDetectionsImpl;
92 std::unique_ptr<LastDetectionsImpl> mLastDetectionsImpl;
105 static std::vector<ds::AggregatedBody> aggregateOffline(
const std::vector<ds::Body> & bodies );
107 void newDetections(
const std::vector<ds::Body> & bodies );
109 std::vector<ds::AggregatedBody> getFinalizedAggregations(
bool clean =
true );
110 std::vector<ds::AggregatedBody> getOngoingAggregations()
const;
111 std::vector<ds::AggregatedBody> getAllAggregations()
const;
113 void cleanFinalizedAggregations() noexcept;
114 void cleanAll() noexcept;
117 class BodyAggregatorImpl;
118 std::unique_ptr<BodyAggregatorImpl> mBodyAggregatorImpl;
131 void newDetections(
const std::vector<ds::Body> & body );
133 std::vector<ds::AggregatedBody> getAggregations( std::chrono::milliseconds windowDuration = std::chrono::milliseconds{ 0 } );
135 std::chrono::milliseconds getMaxWindowDuration()
const noexcept;
136 void setMaxWindowDuration( std::chrono::milliseconds maxWindowDuration ) noexcept;
138 void clean() noexcept;
141 class SlidingWindowBodyAggregatorImpl;
142 std::unique_ptr<SlidingWindowBodyAggregatorImpl> mSlidingWindowBodyAggregatorImpl;
149 LastBodyDetections( std::chrono::milliseconds maxWindowDuration = std::chrono::milliseconds{ 10000 } );
155 void newDetections(
const std::vector<ds::Body> & bodies );
157 std::vector<ds::Body> getLastDetections( std::chrono::milliseconds windowDuration = std::chrono::milliseconds{ 0 } );
159 std::chrono::milliseconds getMaxWindowDuration()
const noexcept;
160 void setMaxWindowDuration( std::chrono::milliseconds maxWindowDuration ) noexcept;
162 void clean() noexcept;
165 class LastBodyDetectionsImpl;
166 std::unique_ptr<LastBodyDetectionsImpl> mLastBodyDetectionsImpl;