# PartialOrder<T> class abstract

The `PartialOrder` type class is used to define a partial ordering on some type `A`.

A partial order is defined by a relation <=, which obeys the following laws:

• x <= x (reflexivity)
• if x <= y and y <= x, then x == y (anti-symmetry)
• if x <= y and y <= z, then x <= z (transitivity)

To compute both <= and >= at the same time, we use a `double` number to encode the result of the comparisons x <= y and x >= y.

The truth table is defined as follows:

x <= y x >= y result note
true true 0.0 (corresponds to x == y)
false false null (x and y cannot be compared)
true false -1.0 (corresponds to x < y)
false true 1.0 (corresponds to x > y)

Note: A partial order under which every pair of elements is comparable is called a total order (Order).

Inheritance
Implementers

PartialOrder()
const

## Properties

hashCode int
The hash code for this object.
runtimeType Type
A representation of the runtime type of the object.

## Methods

and(Eq<T> eq) Eq<T>
Return an `Eq` that gives the result of and of `eq1` and `eq2`.
inherited
contramap<A>(T map(A)) PartialOrder<A>
Return an Eq instance based on a parameter of type `T` extracted from a class `A`.
override
eqv(T x, T y) bool
Returns `true` if `x` == `y`, `false` otherwise.
override
gt(T x, T y) bool
Returns `true` if `x` > `y`, `false` otherwise.
gteqv(T x, T y) bool
Returns `true` if `x` >= `y`, `false` otherwise.
lt(T x, T y) bool
Returns `true` if `x` < `y`, `false` otherwise.
lteqv(T x, T y) bool
Returns `true` if `x` <= `y`, `false` otherwise.
neqv(T x, T y) bool
Returns `false` if `x` and `y` are equivalent, `true` otherwise.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
or(Eq<T> eq) Eq<T>
Return an `Eq` that gives the result of or of this Eq and `eq`.
inherited
partialCompare(T x, T y) double?
Result of comparing `x` with `y`.
toString()
A string representation of this object.
inherited
xor(Eq<T> eq) Eq<T>
Return an `Eq` that gives the result of xor of this Eq and `eq`.
inherited

## Operators

operator ==(Object other) bool
The equality operator.
inherited

## Static Methods

by<A, B>(B f(A a), PartialOrder<B> po) PartialOrder<A>
Convert an implicit `PartialOrder[B]` to an `PartialOrder[A]` using the given function `f`.
override
from<A>( f(A a1, A a2)) PartialOrder<A>
Define a `PartialOrder[A]` using the given function `f`.
reverse<A>(PartialOrder<A> p) PartialOrder<A>
Defines a partial order on `A` from `p` where all arrows switch direction.
{"ft_lang_label":"__label__en","ft_lang_prob":0.5343548,"math_prob":0.9700717,"size":2600,"snap":"2023-40-2023-50","text_gpt3_token_len":814,"char_repetition_ratio":0.13828968,"word_repetition_ratio":0.14373717,"special_character_ratio":0.29846153,"punctuation_ratio":0.10373444,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9987129,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-26T09:12:50Z\",\"WARC-Record-ID\":\"<urn:uuid:333089d5-902e-4360-a156-dec072f08294>\",\"Content-Length\":\"23026\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9a22d85a-4c4f-4f53-a4ae-69604557ca8d>\",\"WARC-Concurrent-To\":\"<urn:uuid:7e73eead-2a3d-49c6-9bfb-4d493bed2f92>\",\"WARC-IP-Address\":\"216.239.38.21\",\"WARC-Target-URI\":\"https://pub.dev/documentation/fpdart/latest/fpdart/PartialOrder-class.html\",\"WARC-Payload-Digest\":\"sha1:DHZT3AKIFB67VHTDLNXHGBJ6V6HJWRYB\",\"WARC-Block-Digest\":\"sha1:P7THPRJT4TXRYGY32BZNWFFQJ6THV3WS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510179.22_warc_CC-MAIN-20230926075508-20230926105508-00829.warc.gz\"}"}