14 constexpr bool operator()(std::pair<int, double>
const &a,
15 std::pair<int, double>
const &b)
const noexcept {
16 return a.second > b.second;
35 const float coords_z) {
36 this->
coords_ = {coords_x, coords_y, coords_z};
48 std::array<double, 5> &coordinates)
const {
49 coordinates[0] = geometricalFactor * this->
x_;
50 coordinates[1] = geometricalFactor * this->
y_;
51 if(geometricalFactor < 1) {
52 coordinates[2] = (1 - geometricalFactor) * this->
coords_[0];
53 coordinates[3] = (1 - geometricalFactor) * this->
coords_[1];
54 coordinates[4] = (1 - geometricalFactor) * this->
coords_[2];
73 return this->
y_ - this->
x_;
81 const int wasserstein,
82 const double geometricalFactor,
83 const double nonMatchingWeight)
const;
86 const int wasserstein,
87 const double geometricalFactor,
88 const double nonMatchingWeight)
const {
89 return this->
cost(*g, wasserstein, geometricalFactor, nonMatchingWeight);
112 Good(
double x,
double y,
bool is_diagonal,
int id)
131 std::array<float, 3> coords{};
132 const float lb = lambda;
172 inline void assign(
const int b,
const double price) {
201 Bidder(
const double x,
const double y,
const bool is_diagonal,
const int id)
220 std::array<float, 3> coords{};
221 const float lb = lambda;
245 < Geometry::powIntTen<double>(-12);
255 double geometricalFactor,
256 double nonMatchingWeight);
261 double geometricalFactor,
262 double nonMatchingWeight,
264 const int kdt_index = 0);
272 double geometricalFactor,
273 double nonMatchingWeight,
274 std::priority_queue<std::pair<int, double>,
275 std::vector<std::pair<int, double>>,
282 double geometricalFactor,
283 double nonMatchingWeight,
284 std::vector<KDT *> &correspondence_kdt_map,
285 std::priority_queue<std::pair<int, double>,
286 std::vector<std::pair<int, double>>,
288 const int kdt_index = 0);
307 this->position_in_auction_ = pos;
310 return this->position_in_auction_;
323 int position_in_auction_{};
int runDiagonalBidding(GoodDiagram *goods, Good &twinGood, int wasserstein, double epsilon, double geometricalFactor, double nonMatchingWeight, std::priority_queue< std::pair< int, double >, std::vector< std::pair< int, double > >, Compare > &diagonal_queue)
void setDiagonalPrice(const double price)
int runKDTBidding(GoodDiagram *goods, Good &diagonalGood, int wasserstein, double epsilon, double geometricalFactor, double nonMatchingWeight, KDT *kdt, const int kdt_index=0)
void setPricePaid(const double price)
int runBidding(GoodDiagram *goods, Good &diagonalGood, int wasserstein, double epsilon, double geometricalFactor, double nonMatchingWeight)
void setPositionInAuction(const int pos)
void setProperty(const Good &g)
Bidder(const PersistencePair &pair, const int id, const double lambda)
int getPositionInAuction() const
const Good & getProperty() const
Bidder(const double x, const double y, const bool is_diagonal, const int id)
int runDiagonalKDTBidding(GoodDiagram *goods, Good &diagonalGood, int wasserstein, double epsilon, double geometricalFactor, double nonMatchingWeight, std::vector< KDT * > &correspondence_kdt_map, std::priority_queue< std::pair< int, double >, std::vector< std::pair< int, double > >, Compare > &diagonal_queue, const int kdt_index=0)
Good(double x, double y, bool is_diagonal, int id)
void setOwner(const int idx)
Good(const PersistencePair &pair, const int id, const double lambda)
Good & operator=(const Good &)=default
void assign(const int b, const double price)
void setPrice(const double price)
Good(const PersistencePair &pair, const int id)
Good(const Good &)=default
void SetCriticalCoordinates(const float coords_x, const float coords_y, const float coords_z)
std::array< float, 3 > coords_
PersistenceDiagramAuctionActor(double x, double y, bool is_diagonal, int id)
double getPersistence() const
std::array< double, 3 > geom_pair_length_
double cost(const PersistenceDiagramAuctionActor *g, const int wasserstein, const double geometricalFactor, const double nonMatchingWeight) const
PersistenceDiagramAuctionActor()=default
double getPairGeometricalLength(const int wasserstein) const
std::array< float, 3 > GetCriticalCoordinates() const
void GetKDTCoordinates(double geometricalFactor, std::array< double, 5 > &coordinates) const
double cost(const PersistenceDiagramAuctionActor &g, const int wasserstein, const double geometricalFactor, const double nonMatchingWeight) const
void SetCriticalCoordinates(const std::array< float, 3 > coords)
void SetCoordinates(const double x, const double y)
T1 pow(const T1 val, const T2 n)
std::vector< Bidder > BidderDiagram
std::vector< Good > GoodDiagram
constexpr bool operator()(std::pair< int, double > const &a, std::pair< int, double > const &b) const noexcept
std::array< float, 3 > coords
ttk::CriticalVertex birth
ttk::CriticalVertex death