1 #ifndef __JTOOLS__JCOMBINATORICS__
2 #define __JTOOLS__JCOMBINATORICS__
14 namespace JPP {
using namespace JTOOLS; }
34 std::pair<int, int>(-1, -1)
45 std::pair<int, int>(first, second)
58 if (first.first == second.first)
59 return first.second < second.second;
61 return first.first < second.first;
104 zbuf2D.resize(numberOfIndices);
106 for (
int i = 0;
i != numberOfIndices; ++
i) {
107 zbuf2D[
i].resize(numberOfIndices);
110 for (
int i = 0;
i != numberOfIndices; ++
i) {
114 for (
int j =
i; ++
j != numberOfIndices; ) {
168 return getIndex(pair.first, pair.second);
189 template<
class JComparator_t>
190 void sort(JComparator_t comparator)
192 std::stable_sort(
zbuf1D.begin(),
zbuf1D.end(), comparator);
194 for (
int i = 0;
i != (int)
zbuf1D.size(); ++
i) {
198 zbuf2D[pair.first][pair.second] =
i;
199 zbuf2D[pair.second][pair.first] =
i;
202 for (
int i = 0;
i != (int)
zbuf2D.size(); ++
i) {
217 return (second >= first ? +1 : -1);
229 return getSign(pair.first, pair.second);
JCombinatorics::pair_type pair_type
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first