Mercurial > ~dholland > hg > ag > index.cgi
comparison doc/misc/html/oldclasslib/pair.html @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | |
2 <HTML> | |
3 <HEAD> | |
4 <TITLE>Pair Class Definition</TITLE> | |
5 </HEAD> | |
6 | |
7 | |
8 <BODY BGCOLOR="#ffffff" BACKGROUND="tilbl6h.gif" | |
9 TEXT="#000000" LINK="#0033CC" | |
10 VLINK="#CC0033" ALINK="#CC0099"> | |
11 | |
12 <P> | |
13 <IMG ALIGN="right" SRC="../images/agrsl6c.gif" ALT="AnaGram" | |
14 WIDTH=124 HEIGHT=30 > | |
15 <BR CLEAR="all"> | |
16 Back to : | |
17 <A HREF="../index.html">Index</A> | | |
18 <A HREF="index.html">Class libraries for examples</A> | |
19 <P> | |
20 | |
21 <IMG ALIGN="bottom" SRC="../images/rbline6j.gif" ALT="----------------------" | |
22 WIDTH=1010 HEIGHT=2 > | |
23 <P> | |
24 | |
25 <H1>Pair Class Definition</H1> | |
26 <IMG ALIGN="bottom" SRC="../images/rbline6j.gif" ALT="----------------------" | |
27 WIDTH=1010 HEIGHT=2 > | |
28 <P> | |
29 <BR> | |
30 <H2>Introduction</H2> | |
31 <P> | |
32 <CODE> pair<class T> </CODE> is a template class that provides arithmetic | |
33 and comparison operations on ordered pairs of elements of | |
34 type T. Class T must implement arithmetic and comparison | |
35 operators. | |
36 <P> | |
37 All operations are element-wise, including multiplication, | |
38 division and comparisons. Using these definitions, sets | |
39 of pairs are not well ordered in the mathematical sense. That | |
40 is, it is possible that for pairs p and q both p < q and | |
41 p > q could be false. | |
42 <P> | |
43 Pairs of integers are quite useful for recording and | |
44 manipulating screen coordinates. | |
45 <P> | |
46 <BR> | |
47 | |
48 <H2> Constructors </H2> | |
49 | |
50 There are two constructors, one which takes two arguments of | |
51 type T, and sets the elements of the pair appropriately. The | |
52 other constructor takes no arguments, and initializes the | |
53 elements to zero. | |
54 | |
55 <P> | |
56 <BR> | |
57 | |
58 | |
59 <IMG ALIGN="bottom" SRC="../images/rbline6j.gif" ALT="----------------------" | |
60 WIDTH=1010 HEIGHT=2 > | |
61 <P> | |
62 <IMG ALIGN="right" SRC="../images/pslrb6d.gif" ALT="Parsifal Software" | |
63 WIDTH=181 HEIGHT=25> | |
64 <BR CLEAR="right"> | |
65 | |
66 <P> | |
67 Back to : | |
68 <A HREF="../index.html">Index</A> | | |
69 <A HREF="index.html">Class libraries for examples</A> | |
70 | |
71 <P> | |
72 <ADDRESS><FONT SIZE="-1"> | |
73 AnaGram parser generator - examples<BR> | |
74 Class libraries - Pair class definition<BR> | |
75 Copyright © 1993-1999, Parsifal Software. <BR> | |
76 All Rights Reserved.<BR> | |
77 </FONT></ADDRESS> | |
78 | |
79 </BODY> | |
80 </HTML> | |
81 |