Commit 7d60c392 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Model/getNeighbors: explictly state that initial indices have to be part of the set

parent d1fd022b
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -411,19 +411,23 @@ namespace allpix {
        virtual std::pair<int, int> getPixelIndex(const ROOT::Math::XYZPoint& position) const;

        /**
         * @brief Return a set containing all channels neigboring the given one with a configurable maximum distance
         * @param idx       Index of the channel in question
         * @brief Return a set containing all pixels neighboring the given one with a configurable maximum distance
         * @param idx       Index of the pixel in question
         * @param distance  Distance for pixels to be considered neighbors
         * @return Set of neighboring pixel indices
         * @return Set of neighboring pixel indices, including the initial pixel
         *
         * @note The returned set should always also include the initial pixel indices the neighbors are calculated for
         */
        virtual std::set<Pixel::Index> getNeighbors(const Pixel::Index& idx, const size_t distance) const;

        /**
         * @brief Return a set containing all channels neigboring the two given channels with a configurable maximum distance
         * @param idx       Index of the first channel in question
         * @param last_idx  Index of the second channel in question
         * @brief Return a set containing all pixels neighboring the two given pixels with a configurable maximum distance
         * @param idx       Index of the first pixel in question
         * @param last_idx  Index of the second pixel in question
         * @param distance  Distance for pixels to be considered neighbors
         * @return Set of neighboring pixel indices
         * @return Set of neighboring pixel indices, including the two initial pixels
         *
         * @note The returned set should always also include the initial pixel indices the neighbors are calculated for
         */
        virtual std::set<Pixel::Index>
        getNeighbors(const Pixel::Index& idx, const Pixel::Index& last_idx, const size_t distance) const;