From a905f129155adcccc9c02b9a8aa94cac8f24a66a Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 22 Sep 2019 08:06:56 +0200 Subject: [PATCH] Document _cmp_order for tuple --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 95fbb661..f5367819 100644 --- a/README.md +++ b/README.md @@ -2284,6 +2284,15 @@ There is as many methods as there are elements. Compare 'tuple1' to 'tuple2' using lexicographic order. This method is created only if all oplists of the tuple define CMP method. +##### int name\_cmp\_order(const name\_t tuple1, const name\_t tuple2, const int order[]) + +Compare 'tuple1' to 'tuple2' using the given order. +'order' is a null terminated array of int that defines the order of comparison: +an order of {1,4,2,0} indicates to compare first the first field, +if it is equal, to compare the fourth and so on. The third field is not +compared. A negative value indicates to revert the comparison. +This method is created only if all oplists of the tuple define CMP method. + ##### int name\_cmp\_element1(const name\_t tuple1, const name\_t tuple2) Compare 'tuple1' to 'tuple2' using only the element element1 as reference.