191 lines
15 KiB
HTML
191 lines
15 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module geosolver.vector</title>
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="geosolver.html"><font color="#ffffff">geosolver</font></a>.vector</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/rick/Programming/Python/GeoSolver/geosolver/vector.py">/home/rick/Programming/Python/GeoSolver/geosolver/vector.py</a></font></td></tr></table>
|
|
<p><tt># a python <a href="#vector">vector</a> class<br>
|
|
# A. Pletzer 5 Jan 00/11 April 2002<br>
|
|
#</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
|
|
</td><td width="25%" valign=top><a href="random.html">random</a><br>
|
|
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ee77aa">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl>
|
|
<dt><font face="helvetica, arial"><a href="__builtin__.html#list">__builtin__.list</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
|
|
</font></dt><dd>
|
|
<dl>
|
|
<dt><font face="helvetica, arial"><a href="geosolver.vector.html#vector">vector</a>
|
|
</font></dt></dl>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#ffc8d8">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#000000" face="helvetica, arial"><a name="vector">class <strong>vector</strong></a>(<a href="__builtin__.html#list">__builtin__.list</a>)</font></td></tr>
|
|
|
|
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
<td colspan=2><tt>A <a href="__builtin__.html#list">list</a> based <a href="#vector">vector</a> class<br> </tt></td></tr>
|
|
<tr><td> </td>
|
|
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
<dd><a href="geosolver.vector.html#vector">vector</a></dd>
|
|
<dd><a href="__builtin__.html#list">__builtin__.list</a></dd>
|
|
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods defined here:<br>
|
|
<dl><dt><a name="vector-AbsArg"><strong>AbsArg</strong></a>(self)</dt><dd><tt>Return modulus and phase parts</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-ReIm"><strong>ReIm</strong></a>(self)</dt><dd><tt>Return the real and imaginary parts</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__add__"><strong>__add__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-__div__"><strong>__div__</strong></a>(self, other)</dt><dd><tt>Element by element division.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__getslice__"><strong>__getslice__</strong></a>(self, i, j)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Element by element multiplication</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__neg__"><strong>__neg__</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-__rdiv__"><strong>__rdiv__</strong></a>(self, other)</dt><dd><tt>The same as __div__</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__rmul__"><strong>__rmul__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-__sub__"><strong>__sub__</strong></a>(self, other)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-conjugate"><strong>conjugate</strong></a>(self)</dt></dl>
|
|
|
|
<dl><dt><a name="vector-out"><strong>out</strong></a>(self)</dt><dd><tt>Prints out the <a href="#vector">vector</a>.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-size"><strong>size</strong></a>(self)</dt></dl>
|
|
|
|
<hr>
|
|
Data descriptors defined here:<br>
|
|
<dl><dt><strong>__dict__</strong></dt>
|
|
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
|
|
</dl>
|
|
<dl><dt><strong>__weakref__</strong></dt>
|
|
<dd><tt>list of weak references to the object (if defined)</tt></dd>
|
|
</dl>
|
|
<hr>
|
|
Methods inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><a name="vector-__contains__"><strong>__contains__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__contains__">__contains__</a>(y) <==> y in x</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__delitem__"><strong>__delitem__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__delitem__">__delitem__</a>(y) <==> del x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__delslice__"><strong>__delslice__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__delslice__">__delslice__</a>(i, j) <==> del x[i:j]<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__eq__"><strong>__eq__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__eq__">__eq__</a>(y) <==> x==y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__ge__"><strong>__ge__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__ge__">__ge__</a>(y) <==> x>=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__gt__"><strong>__gt__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__gt__">__gt__</a>(y) <==> x>y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__hash__"><strong>__hash__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__hash__">__hash__</a>() <==> hash(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__iadd__"><strong>__iadd__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__iadd__">__iadd__</a>(y) <==> x+=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__imul__"><strong>__imul__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__imul__">__imul__</a>(y) <==> x*=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__iter__"><strong>__iter__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__iter__">__iter__</a>() <==> iter(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__le__"><strong>__le__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__le__">__le__</a>(y) <==> x<=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__len__"><strong>__len__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__len__">__len__</a>() <==> len(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__lt__"><strong>__lt__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__lt__">__lt__</a>(y) <==> x<y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__ne__"><strong>__ne__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__ne__">__ne__</a>(y) <==> x!=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__reversed__"><strong>__reversed__</strong></a>(...)</dt><dd><tt>L.<a href="#vector-__reversed__">__reversed__</a>() -- return a reverse iterator over the <a href="__builtin__.html#list">list</a></tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__setitem__"><strong>__setitem__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__setitem__">__setitem__</a>(i, y) <==> x[i]=y</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-__setslice__"><strong>__setslice__</strong></a>(...)</dt><dd><tt>x.<a href="#vector-__setslice__">__setslice__</a>(i, j, y) <==> x[i:j]=y<br>
|
|
<br>
|
|
Use of negative indices is not supported.</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-append"><strong>append</strong></a>(...)</dt><dd><tt>L.<a href="#vector-append">append</a>(object) -- append object to end</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#vector-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#vector-extend">extend</a>(iterable) -- extend <a href="__builtin__.html#list">list</a> by appending elements from the iterable</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#vector-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-insert"><strong>insert</strong></a>(...)</dt><dd><tt>L.<a href="#vector-insert">insert</a>(index, object) -- insert object before index</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-pop"><strong>pop</strong></a>(...)</dt><dd><tt>L.<a href="#vector-pop">pop</a>([index]) -> item -- remove and return item at index (default last)</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-remove"><strong>remove</strong></a>(...)</dt><dd><tt>L.<a href="#vector-remove">remove</a>(value) -- remove first occurrence of value</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-reverse"><strong>reverse</strong></a>(...)</dt><dd><tt>L.<a href="#vector-reverse">reverse</a>() -- reverse *IN PLACE*</tt></dd></dl>
|
|
|
|
<dl><dt><a name="vector-sort"><strong>sort</strong></a>(...)</dt><dd><tt>L.<a href="#vector-sort">sort</a>(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;<br>
|
|
cmp(x, y) -> -1, 0, 1</tt></dd></dl>
|
|
|
|
<hr>
|
|
Data and other attributes inherited from <a href="__builtin__.html#list">__builtin__.list</a>:<br>
|
|
<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object at 0x814a120><dd><tt>T.<a href="#vector-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</tt></dl>
|
|
|
|
</td></tr></table></td></tr></table><p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#eeaa77">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-acos"><strong>acos</strong></a>(a)</dt><dd><tt>Elementwise inverse cosine.</tt></dd></dl>
|
|
<dl><dt><a name="-asin"><strong>asin</strong></a>(a)</dt><dd><tt>Elementwise inverse sine.</tt></dd></dl>
|
|
<dl><dt><a name="-atan"><strong>atan</strong></a>(a)</dt><dd><tt>Elementwise inverse tangent.</tt></dd></dl>
|
|
<dl><dt><a name="-atan2"><strong>atan2</strong></a>(a, b)</dt><dd><tt>Arc tangent</tt></dd></dl>
|
|
<dl><dt><a name="-cos"><strong>cos</strong></a>(a)</dt><dd><tt>Elementwise cosine.</tt></dd></dl>
|
|
<dl><dt><a name="-cosh"><strong>cosh</strong></a>(a)</dt><dd><tt>Elementwise hyperbolic cosine.</tt></dd></dl>
|
|
<dl><dt><a name="-cross"><strong>cross</strong></a>(a, b)</dt><dd><tt>cross product of two 3-vectors.</tt></dd></dl>
|
|
<dl><dt><a name="-dot"><strong>dot</strong></a>(a, b)</dt><dd><tt>dot product of two vectors.</tt></dd></dl>
|
|
<dl><dt><a name="-exp"><strong>exp</strong></a>(a)</dt><dd><tt>Elementwise exponential.</tt></dd></dl>
|
|
<dl><dt><a name="-isVector"><strong>isVector</strong></a>(x)</dt><dd><tt>Determines if the argument is a <a href="#vector">vector</a> class object.</tt></dd></dl>
|
|
<dl><dt><a name="-log"><strong>log</strong></a>(a)</dt><dd><tt>log of each element of a.</tt></dd></dl>
|
|
<dl><dt><a name="-log10"><strong>log10</strong></a>(a)</dt><dd><tt>log10 of each element of a.</tt></dd></dl>
|
|
<dl><dt><a name="-norm"><strong>norm</strong></a>(a)</dt><dd><tt>Computes the norm of <a href="#vector">vector</a> a.</tt></dd></dl>
|
|
<dl><dt><a name="-ones"><strong>ones</strong></a>(n)</dt><dd><tt>Returns a <a href="#vector">vector</a> of length n with all ones.</tt></dd></dl>
|
|
<dl><dt><a name="-pow"><strong>pow</strong></a>(a, b)</dt><dd><tt>Takes the elements of a and raises them to the b-th power</tt></dd></dl>
|
|
<dl><dt><a name="-randvec"><strong>randvec</strong></a>(n, lmin<font color="#909090">=0.0</font>, lmax<font color="#909090">=1.0</font>, roundoff<font color="#909090">=0.0</font>)</dt><dd><tt>Returns a random <a href="#vector">vector</a> of length n.</tt></dd></dl>
|
|
<dl><dt><a name="-sin"><strong>sin</strong></a>(a)</dt><dd><tt>Elementwise sine.</tt></dd></dl>
|
|
<dl><dt><a name="-sinh"><strong>sinh</strong></a>(a)</dt><dd><tt>Elementwise hyperbolic sine.</tt></dd></dl>
|
|
<dl><dt><a name="-sqrt"><strong>sqrt</strong></a>(a)</dt><dd><tt>Elementwise sqrt.</tt></dd></dl>
|
|
<dl><dt><a name="-sum"><strong>sum</strong></a>(a)</dt><dd><tt>Returns the sum of the elements of a.</tt></dd></dl>
|
|
<dl><dt><a name="-tan"><strong>tan</strong></a>(a)</dt><dd><tt>Elementwise tangent.</tt></dd></dl>
|
|
<dl><dt><a name="-tanh"><strong>tanh</strong></a>(a)</dt><dd><tt>Elementwise hyperbolic tangent.</tt></dd></dl>
|
|
<dl><dt><a name="-zeros"><strong>zeros</strong></a>(n)</dt><dd><tt>Returns a zero <a href="#vector">vector</a> of length n.</tt></dd></dl>
|
|
</td></tr></table>
|
|
</body></html> |