1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
<html><head><TITLE>Point</TITLE></head>
<body>
<H2><A HREF ="#DOC.DOCU" > <IMG BORDER=0 SRC=down.gif></A> class Point </H2><BLOCKQUOTE>
2-dimensional integer point ADT
</BLOCKQUOTE>
<hr>
<DL>
<TABLE>
<DT><h3>Public Fields</h3><DD><TR><TD VALIGN=top><A HREF="#DOC.250.1"> <IMG BORDER=0 SRC=icon1.gif></A> static const <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>ZERO</B> <br>
<I></I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.20"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>x</B> <br>
<I> the x-coordinate.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.21"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>y</B> <br>
<I> the y-coordinate.</I>
</TD></TR></TABLE><TABLE>
<DT><h3>Public Methods</h3><DD><TR><TD VALIGN=top><A HREF="#DOC.250.2"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Point</B> (int a = 0, int b = 0)<br>
<I> Construct and initialize point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.3"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Point</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> &p)<br>
<I> Copy constructor.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.4"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>Set</B> (int a, int b)<br>
<I> Set point to (a,b).</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.5"> <IMG BORDER=0 SRC=icon1.gif></A> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>operator+</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)<br>
<I> Add points.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.6"> <IMG BORDER=0 SRC=icon1.gif></A> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>operator-</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)<br>
<I> Subtract points.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.7"> <IMG BORDER=0 SRC=icon1.gif></A> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>operator*</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)<br>
<I> Multiply points.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.8"> <IMG BORDER=0 SRC=icon1.gif></A> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>operator/</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)<br>
<I> Devide points.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.9"> <IMG BORDER=0 SRC=icon1.gif></A> <!2><A HREF="Point.html#DOC.250.2">Point</A> </TD><TD><B>operator-</B> ()<br>
<I> Subtract point from point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.10"> <IMG BORDER=0 SRC=icon1.gif></A> friend bool </TD><TD><B>operator==</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.20">x</A>, const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.21">y</A>)<br>
<I> Return whether points are equal.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.11"> <IMG BORDER=0 SRC=icon1.gif></A> friend bool </TD><TD><B>operator!=</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.20">x</A>, const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.21">y</A>)<br>
<I> Return whether points are unequal.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.12"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator+=</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)<br>
<I> Translate the point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.13"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator-=</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)<br>
<I> Translate the point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.14"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator*=</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)<br>
<I> Translate the point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.15"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator/=</B> (const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)<br>
<I> Translate the point.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.16"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator*</B> (int c)<br>
<I> Multiply by constant.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.17"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>operator*</B> (double c)<br>
<I> Multiply by constant.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.18"> <IMG BORDER=0 SRC=icon1.gif></A> friend ostream& </TD><TD><B>operator<<</B> (ostream &o, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p)<br>
<I> Write string representation to ostream.</I>
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.250.19"> <IMG BORDER=0 SRC=icon1.gif></A> friend istream& </TD><TD><B>operator>></B> (istream &i, <!2><A HREF="Point.html#DOC.250.2">Point</A> &p)<br>
<I> Read string representation from istream.</I>
</TD></TR></TABLE></DL>
<A NAME="DOC.DOCU">
<hr>
<h2> Documentation </h2>
<BLOCKQUOTE>
2-dimensional integer point ADT
</BLOCKQUOTE>
<DL>
<A NAME="ZERO">
<A NAME ="DOC.250.1">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> static const <!2><A HREF="Point.html#DOC.250.2">Point</A> ZERO</B></TT>
<DL></DL><P>
<A NAME="Point">
<A NAME ="DOC.250.2">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> Point(int a = 0, int b = 0)</B></TT>
<DD> Construct and initialize point.
<DL></DL><P>
<A NAME="Point">
<A NAME ="DOC.250.3">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> Point(const <!2><A HREF="Point.html#DOC.250.2">Point</A> &p)</B></TT>
<DD> Copy constructor.
<DL></DL><P>
<A NAME="Set">
<A NAME ="DOC.250.4">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void Set(int a, int b)</B></TT>
<DD> Set point to (a,b).
<DL></DL><P>
<A NAME="operator+">
<A NAME ="DOC.250.5">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> operator+(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)</B></TT>
<DD> Add points.
<DL></DL><P>
<A NAME="operator-">
<A NAME ="DOC.250.6">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> operator-(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)</B></TT>
<DD> Subtract points.
<DL></DL><P>
<A NAME="operator*">
<A NAME ="DOC.250.7">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> operator*(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)</B></TT>
<DD> Multiply points.
<DL></DL><P>
<A NAME="operator/">
<A NAME ="DOC.250.8">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend <!2><A HREF="Point.html#DOC.250.2">Point</A> operator/(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p2)</B></TT>
<DD> Devide points.
<DL></DL><P>
<A NAME="operator-">
<A NAME ="DOC.250.9">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> <!2><A HREF="Point.html#DOC.250.2">Point</A> operator-()</B></TT>
<DD> Subtract point from point.
<DL></DL><P>
<A NAME="operator==">
<A NAME ="DOC.250.10">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend bool operator==(const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.20">x</A>, const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.21">y</A>)</B></TT>
<DD> Return whether points are equal.
<DL></DL><P>
<A NAME="operator!=">
<A NAME ="DOC.250.11">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend bool operator!=(const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.20">x</A>, const <!2><A HREF="Point.html#DOC.250.2">Point</A> &<!2><A HREF="Point.html#DOC.250.21">y</A>)</B></TT>
<DD> Return whether points are unequal.
<DL></DL><P>
<A NAME="operator+=">
<A NAME ="DOC.250.12">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator+=(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)</B></TT>
<DD> Translate the point.
<DL></DL><P>
<A NAME="operator-=">
<A NAME ="DOC.250.13">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator-=(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)</B></TT>
<DD> Translate the point.
<DL></DL><P>
<A NAME="operator*=">
<A NAME ="DOC.250.14">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator*=(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)</B></TT>
<DD> Translate the point.
<DL></DL><P>
<A NAME="operator/=">
<A NAME ="DOC.250.15">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator/=(const <!2><A HREF="Point.html#DOC.250.2">Point</A> p1)</B></TT>
<DD> Translate the point.
<DL></DL><P>
<A NAME="operator*">
<A NAME ="DOC.250.16">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator*(int c)</B></TT>
<DD> Multiply by constant.
<DL></DL><P>
<A NAME="operator*">
<A NAME ="DOC.250.17">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void operator*(double c)</B></TT>
<DD> Multiply by constant.
<DL></DL><P>
<A NAME="operator<<">
<A NAME ="DOC.250.18">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend ostream& operator<<(ostream &o, const <!2><A HREF="Point.html#DOC.250.2">Point</A> p)</B></TT>
<DD> Write string representation to ostream.
<DL></DL><P>
<A NAME="operator>>">
<A NAME ="DOC.250.19">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend istream& operator>>(istream &i, <!2><A HREF="Point.html#DOC.250.2">Point</A> &p)</B></TT>
<DD> Read string representation from istream.
<DL></DL><P>
<A NAME="x">
<A NAME ="DOC.250.20">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int x</B></TT>
<DD> the x-coordinate.
<DL></DL><P>
<A NAME="y">
<A NAME ="DOC.250.21">
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int y</B></TT>
<DD> the y-coordinate.
<DL></DL><P></DL>
<hr>
<DL><DT><B>This class has no child classes.</B></DL>
<DL></DL><P><I><A HREF="aindex.html"> alphabetic index</A></I> <I><A HREF="HIER.html"> hierarchy of classes</A></I><P><hr>
<A HREF="http://www.zib.de/Visual/software/doc++/index.html"><IMG BORDER=0 ALIGN=RIGHT SRC=logo.gif></A>
<P Align=Center><I>this page has been generated automatically by doc++</I>
<P Align=Center><I>(c)opyright by <A HREF="http://www.zib.de/zoeckler/"> Malte Zöckler</A>, <A HREF="mailto:wunderling@zib.de"> Roland Wunderling </A><br>contact: <A HREF="mailto:doc++@zib.de"> doc++@zib.de</a></I>
</BODY>
|