Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-01-28 15:32:55


Hi John,

This is great!

BTW, I assume that there are some preconditions on the data set. What are
they?

On Mon, 28 Jan 2002, johnrpanzer wrote:
jpanze> All,
jpanze>
jpanze> Many moons ago, I asked if there would be any interest
jpanze> in something to do runtime concept checking (at least
jpanze> for ordering predicates). One or two people expressed
jpanze> some mild curiosity, so as part of my New Year's resolutions,
jpanze> I've uploaded a draft implementation of an ordering
jpanze> predicate checker to:
jpanze>
jpanze> http://groups.yahoo.com/group/boost/files/test_strict_weak_ordering/
jpanze>
jpanze> Example:
jpanze>
jpanze> less_equal<T> is not a Strict Weak Ordering. The code:
jpanze>
jpanze> int intdata[] = {3, 5, 8 , 29, 872, 5839};
jpanze> assert(test_strict_weak_ordering(less_equal<int>(),
jpanze> intdata,intdata+6));
jpanze>
jpanze> will produce output like:
jpanze>
jpanze> Predicate fails irreflexivity; a<a not allowed:#0=3
jpanze> Predicate fails irreflexivity; a<a not allowed: #1=5
jpanze> ...
jpanze> Predicate fails antisymmetry; a<b and b<a: #0=3, #0=3
jpanze> Predicate fails antisymmetry; a<b and b<a: #1=5, #1=5
jpanze> ...
jpanze> assertion failed, line 15: ...
jpanze>
jpanze>
jpanze> Please let me know what you think.
jpanze>
jpanze> Regards,
jpanze> John Panzer
jpanze> jpanzer_at_[hidden]
jpanze> jpanzer_at_[hidden]

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk