Skip to content

Commit

Permalink
Add get methods in mathcing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Apr 17, 2024
1 parent 5c6e597 commit 2c29ec6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
16 changes: 10 additions & 6 deletions inc/adani/MatchingCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Description: Header file for the
* MatchingCondition.cc file.
*
* Author: Vamo!!
* Author: Non credo esista una persona che analizzi il calcio meglio di me.
*
* In this file there are the matching conditions.
*
Expand Down Expand Up @@ -34,15 +34,19 @@ class MatchingCondition {
);
~MatchingCondition(){};

int GetOrder() const {return order_;};
char GetEntry1() const {return entry1_;};
char GetEntry2() const {return entry2_;};
string GetVersion() const {return version_;};

Value MuIndependentNfIndependentTerm(double x) const;
vector<double> NotOrdered(double x) const;

private:
int order_;
char entry1_;
char entry2_;

string version_;
const int order_;
const char entry1_;
const char entry2_;
const string version_;

//==========================================================================================//
// Matching conditions O(as)
Expand Down
11 changes: 3 additions & 8 deletions src/MatchingCondition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,25 @@ using std::endl;
MatchingCondition::MatchingCondition(
const int &order, const char &entry1, const char &entry2,
const string &version
) {
) : order_(order), entry1_(entry1), entry2_(entry2), version_(version) {
// check order
if (order != 3) {
cout << "Error: only order = 3 is implemented. Got " << order << endl;
exit(-1);
}
order_ = order;

// check entry1
if (entry1 != 'Q') {
cout << "Error: only entry1 = 'Q' is implemented. Got " << entry1
<< endl;
exit(-1);
}
entry1_ = entry1;

// check entry2
if (entry2 != 'g' && entry2 != 'q') {
cout << "Error: entry2 must be g or q. Got " << entry2 << endl;
exit(-1);
}
entry2_ = entry2;

// check version
if (version != "exact" && version != "abmp" && version != "klmv"
Expand All @@ -58,8 +55,6 @@ MatchingCondition::MatchingCondition(
<< endl;
exit(-1);
}

version_ = version;
}

//==========================================================================================//
Expand Down Expand Up @@ -287,13 +282,13 @@ double MatchingCondition::a_Qg_30(double x, int v) const {
354.1002 * L13 + 479.3838 * L12 - 7856.784 * (2. - x)
- 6233.530 * L2 + 9416.621 / x + 1548.891 / x * L
);
} else if (v == -1) { // Updated version w.r.t v==-12
} else if (v == -1) {
return (
226.3840 * L13 - 652.2045 * L12 - 2686.387 * L1
- 7714.786 * (2. - x) - 2841.851 * L2 + 7721.120 / x
+ 1548.891 / x * L
);
} else if (v == -12) { // Version of the paper (used only for benchamrk)
} else if (v == -12) {
return (
-2658.323 * L12 - 7449.948 * L1 - 7460.002 * (2. - x)
+ 3178.819 * L2 + 4710.725 / x + 1548.891 / x * L
Expand Down

0 comments on commit 2c29ec6

Please sign in to comment.