doc/python/point.rst
author Aravindakshan Babu <akshan@stanford.edu>
Wed, 18 Aug 2010 12:05:18 -0700
branchdev
changeset 220 d07d77561661
parent 219 5311343eb2f5
permissions -rw-r--r--
Removed the points iterator in PersistenceDaigram; replaced it with a __iter__ method. Got rid of some python code in __init__.py, since it was not needed with the above change. Changed the docs to reflect this.

:class:`Point` class
======================

.. class:: Point

    .. method:: __init__( x, y [, data])
    
        Initializes :class:`Point` with the given real-valued coordinates and
        optionally real value `data`, e.g.::
    
            s = Point( 1, 1.1, 1.11 )

    .. attribute:: x
        
        x coordinate of the point

    .. attribute:: y
        
        y coordinate of the point

    .. attribute:: data
        
        Real value stored in the simplex.

    .. method:: __iter__( )

        Point objects are iterable, returning two or three elements depending on presence of data, e.g.::

            p = Point( 1, 1.1, 1.11 )
            for i in p:  print p

            1
            1.1
            1.11