//
// Created by martin on 26. 2. 2021.
//

#ifndef ARC_MATRIX_GENERATECOMBINATIONS_H
#define ARC_MATRIX_GENERATECOMBINATIONS_H

#include "AAMBuild.h"
#include <set>



/**
 * Posterior arc search
 * @param arcs vector of all arcs
 * @param arcIndex arcs with their positions
 * @param r index of the current arc
 * @param phi_r Posterior combination
 * @param PiPlus Stores all results of PAS
 */
void PAS(std::vector<std::vector<cv::Point2i>> & arcs,std::vector<std::vector<int>>& arcIndex,int r,std::set<int> phi_r,std::set<std::set<int>> & PiPlus);

/**
 * Anterior arc search
 * @param arcs vector of all arcs
 * @param arcIndex arcs with their positions
 * @param r index of the current arc
 * @param phi_r Posterior combination
 * @param PiMinus Stores all results of AAS
 */
void AAS(std::vector<std::vector<cv::Point2i>> & arcs,std::vector<std::vector<int>>& arcIndex,int r,std::set<int> phi_r,std::set<std::set<int>> & PiMinus);

/**
 * Bidirectional combination
 * @param arcs vector all arcs
 * @param arcIndex arcs with their positions
 * @return all ellipse candidate combinations
 */
std::set<std::set<int>>  BCV(std::vector<std::vector<cv::Point2i>> & arcs, std::vector<std::vector<int>>& arcIndex);


#endif //ARC_MATRIX_GENERATECOMBINATIONS_H
