partial-ordering Questions

4

Solved

I have a distributed system defined by a sort of "state machine" ( "flow chart" ) each system writes there state in a shared "log" I'm representing each state as part of a sealed trait and a give...
Sledge asked 3/9, 2019 at 14:48

4

Solved

The following piece of code class point: def __init__(self, x, y): self.x = x self.y = y def dispc(self): return ('(' + str(self.x) + ',' + str(self.y) + ')') def __cmp__(self, other): re...
Ornamental asked 26/11, 2011 at 7:27

1

Solved

What are the rules for the selection of overloaded function templates in case of non-type template parameters, if one of the parameters is a placeholder type. I am confused with the current behavio...

2

Solved

While all the integer types in Rust implement Ord which emphasizes total ordering, the floating point types only implement PartialOrd. This means that there could be floating point values which can...
Gybe asked 21/10, 2014 at 14:52

4

Solved

First of all: this is not a duplicate of the question Partial Ordered Comparator but rather builds on it. My goal is to sort a list of objects (e.g. [2, "a", 1]) in-place such that after sorting n...
Agitator asked 12/8, 2015 at 16:16

1

Why are the next two template declarations ambiguous (so neither is more specialized than the other)? I know this question has been raised many times on Stack Overflow, but usually, people answer h...

1

Solved

The rules for picking which class template specialization is preferred involve rewriting the specializations into function templates and determining which function template is more specialized via ...
Lablab asked 23/2, 2017 at 13:22

1

Solved

In reference to this question, which has indeed the same title but for which I found an answer in the standard. I have continued to dig the subject and finaly find out an example code for which th...
Lopsided asked 24/1, 2018 at 18:50

2

Solved

All compilers I could get my hands on agree that this is fine: template <typename Check, typename... T> auto foo(Check, T...) -> void; template <typename... T> auto foo(int, T...) ...
Poss asked 2/9, 2016 at 6:57

6

Solved

I have a list of items that have a partial order relation, i. e, the list can be considered a partially ordered set. I want to sort this list in the same way as in this question. As correctly answe...
Jalap asked 30/12, 2009 at 21:30

1

From §5.2.6/1 we have (emphasis is mine): The value of a postfix ++ expression is the value of its operand. [ Note: the value obtained is a copy of the original value — end note ] The operand ...
Durable asked 1/2, 2016 at 17:25

3

According to [temp.class.order] §14.5.5.2, the selection of a partial specialization of t in this example: template< typename > struct s { typedef void v, w; }; template< typename, typen...

2

Solved

Consider the following simple (to the extent that template questions ever are) example: #include <iostream> template <typename T> struct identity; template <> struct identity&l...

1

Solved

Pointer relational operators do not define a total order (§ 5.9 of the C++11 standard): If two pointers p and q of the same type point to different objects that are not members of the same objec...
Electrode asked 3/6, 2015 at 10:13

2

Solved

I'm completely confused after reading the question How to make these std::function parameters unambiguous?, so far I'd thought I understood what partial ordering of function templates is, but after...

3

I have a web app with data in a grid. The user can reorder the columns, and the server can change which columns exist. I would like to save the user's column order in a cookie and restore it on pag...
Adage asked 21/3, 2014 at 22:29

1

Solved

[SGI official document] Because of irreflexivity and transitivity, operator< always satisfies the definition of a partial ordering. The definition of a strict weak ordering is stricter, an...
Fescue asked 13/9, 2013 at 8:12

1

Solved

Reading the C++11 standard I can't fully understand the meaning of the following statement. Example are very welcome. Two sets of types are used to determine the partial ordering. For each of t...

2

Solved

In 14.8.2.4p10 of the C++11 draft, there is written If for each type being considered a given template is at least as specialized for all types and more specialized for some set of types and the...
Begonia asked 29/3, 2013 at 11:15

2

Solved

Why this is ambiguous? template<class T> void g(T) {} // 1 template<class T> void g(T&) {} // 2 int main() { int q; g(q); } I understand that this is partial ordering context....
Candent asked 22/1, 2013 at 7:48

1

Solved

It seems that scala.math.PartialOrdering.lteq must always be defined as (or at least, give the same result as): override def lteq(x: Pattern, y: Pattern) = { tryCompare(x, y).map(_ <= 0).getOr...
Selfrighteous asked 24/6, 2012 at 8:21

2

Solved

Here is my problem: I have a sequence S of (nonempty but possibly not distinct) sets s_i, and for each s_i need to know how many sets s_j in S (i ≠ j) are subsets of s_i. I also need incremental ...

1

Solved

CONTEXT: I have a smallish (currently less than 100) but growing collection of Regular Expressions, and I want to optimize the process of determining for a given text string which of the REs in my...

4

Solved

While reading another question, i came to a problem with partial ordering, which i cut down to the following test-case template<typename T> struct Const { typedef void type; }; template<...

3

Solved

Probably best illustrated with a small example. Given the relations A < B < C A < P < Q Correct outputs would be ABCPQ or APQBC or APBCQ ... etc. In other words, any ordering is ...

© 2022 - 2025 — McMap. All rights reserved.