Blitz logo

Blitz Support :

From: William Gallafent (william_at_[hidden])
Date: 2004-02-03 21:38:36


On Wednesday 04 February 2004 02:02, William Gallafent wrote:

> I'm probably being stupid (it's getting late)

I was being.

> but I can't see why the following (and anything similar,
> e.g. using a __gnu_cxx::hash_map, in which case it's
> operator== which is in question, rather than operator< as
> here) shouldn't compile:

Immediately after sending that message, I realise that of
course there are different ways in which a vector type could
be considered to be "less than" or "equal to" an other one.

So, I should rephrase my question!

How do I go about writing an expression which will fit into
the Blitz++ machinery which will allow me to write e.g. an
elementwise operator==, or a lexicographical comparison
function, or a modulous comparison function, etc.

In other words, how can I get a generic operator which
overrides that in the blitz headers for vector types and is
able to return a bool to satisfy the comparable requirements
of the STL?

Apologies if this has been discussed before - I'm coming
back to Blitz after a while away.

-- 
Bill Gallafent.