--- myst: substitutions: sentence: "..." sentence2: "(which means all attributes by default if the function is called without argument)" sentence3: ", for a simple double-precision attribute," bloc: python: 1-4,11-19 cpp: 4,7-13 console: python: "7" cpp: "9" --- ```{include} /../core/dataserver/statistics/computing_ranking.md ``` This method has been modified in order to cope with constant size vectors, but also to stabilise its behaviour when going from one compiler version to another. The first modification only consists in considering every element of a constant-size vector independent from the others, so every element is in fact treated as if they were different attributes. The second part is more technical as the sorting method has been changed to use the `std::stable_sort` insuring that platforms (operating systems and compiler versions) will have the same behaviour. The main problem was raising when two patterns had the same value for the attribute under study. In this case, the ranking was not done in the same way depending on the version of the compiler. Now it should be treated in the same way: if two or more patterns have the same value for a specific attribute, the first met in the array of attribute value will have the value $i$ while the second one will be affected with $i+1$ and so on... Here is a small example of this computation: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/dataserver/use_cases/" + language + "/dataserverGeyserRank." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc[language] + "\n" + "```" }} This macro should returns {{ "```{literalinclude} " + parent_dir + "/roottest/build/uranie/doc/dataserver/use_cases/" + language + "/dataserverGeyserRank.log\n" + ":lines: " + console[language] + "\n" + ":language: none\n" + "```" }} ```{admonition} Summary: computeRank - `computeRank`(__const char\*__ varexp="\*", __option*__ option) Create a new attribute for every attribute requested (or for all attributes if no argument is provided) String-type and non-constant-vector-type attribute are disregarded and a warning is shown to let the user know. ```