domain of == for input iterators

S

subramanian100in

In the ISO/IEC 14882:2003 document, in section '24.1.1 Input
Iterators' in page 516, item 2 mentions the following:

"In table 72, the term 'the domain of ==' is used in the ordinary
mathematical sense to denote the set of values over which == is
(required to be) defined."

In this sentence, what is meant by domain ? What is meant by 'set of
values over which == is defined' ? Kindly explain with code sample.

Now the next sentence in this item 2 in this page says:
"This set can change over time."
I am unable to understand what is meant by 'set changing over time'.
Kindly explain with code sample.

The third sentence in this item 2 says:
"Each algorithm places additional requirements on the domain of == for
the iterator values it uses. These requirements can be inferred from
the uses that algorithm makes of == and !="
(This sentence is followed by 'find' algorithm example. I am unable to
understand it.) Kindly give explanation and a code sample using the
algorithm which places additional requirements
on the domain of == for the iterator values.

Kindly explain.

Thanks
V.Subramanian
 
P

Paul Bibbings

In the ISO/IEC 14882:2003 document, in section '24.1.1 Input
Iterators' in page 516, item 2 mentions the following:

"In table 72, the term 'the domain of ==' is used in the ordinary
mathematical sense to denote the set of values over which == is
(required to be) defined."

In this sentence, what is meant by domain ? What is meant by 'set of
values over which == is defined' ? Kindly explain with code sample.

Essentially what you have here *is* a definition of these terms. It
doesn't easily break down, but if you think of a `domain' as `a set of
values', then the `of ==' equates to the `over which == is (required to
be) defined' part.

You might get a better sense of these terms from this article:
http://en.wikipedia.org/wiki/Domain_of_a_function. As in the example
given there, the domain of sqrt(x) is x >= 0. It is only for *this* set
of values (or domain) "over which sqrt(x) is required to be defined."

The text in §24.1.1/2 is really only saying the same for `=='.

The whole context here is quite abstract, so looking for a code example
to illustrate it is perhaps not entirely the right way to be approaching
it. The above, I am hoping, attempts an explanation at a appropriate
level of abstraction.

<snip />

Regards

Paul Bibbings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top