Package pygeodesy :: Module units :: Class FIx |
[frames] | no frames]

# Class FIx

              object --+
                       |
                   float --+
                           |
          object --+       |
                   |       |
        named._Named --+   |
                       |   |
    unitsBase._NamedUnit --+
                           |
             unitsBase.Float --+
                               |
                          Float_ --+
                                   |
                                  FIx

A named Fractional Index, an `int` or `float` index into a `list` or `tuple` of `points`, typically. A `float` Fractional Index `fi` represents a location on the edge between `points[int(fi)]` and `points[(int(fi) + 1) % len(points)]`.

Instance Methods
fractional(self, points, wrap=None, **LatLon_or_Vector_and_kwds) Return the point at this Fractional Index. |
Inherited from `unitsBase.Float`: `__repr__`, `__str__`, `toRepr`, `toStr` Inherited from `float`: `__abs__`, `__add__`, `__coerce__`, `__div__`, `__divmod__`, `__eq__`, `__float__`, `__floordiv__`, `__format__`, `__ge__`, `__getattribute__`, `__getformat__`, `__getnewargs__`, `__gt__`, `__hash__`, `__int__`, `__le__`, `__long__`, `__lt__`, `__mod__`, `__mul__`, `__ne__`, `__neg__`, `__nonzero__`, `__pos__`, `__pow__`, `__radd__`, `__rdiv__`, `__rdivmod__`, `__rfloordiv__`, `__rmod__`, `__rmul__`, `__rpow__`, `__rsub__`, `__rtruediv__`, `__setformat__`, `__sub__`, `__truediv__`, `__trunc__`, `as_integer_ratio`, `conjugate`, `fromhex`, `hex`, `is_integer` Inherited from `named._Named`: `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toStr2` Inherited from `object`: `__delattr__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, fi, fin=None, Error=<class 'pygeodesy.errors.UnitError'>, **name) New, named Fractional Index in a `list` or `tuple` of points. |

Properties
| fin Get the given `len`, the index `[n]` wrapped to `[0]` (`int`).
Inherited from `float`: `imag`, `real` Inherited from `unitsBase._NamedUnit`: `std_repr`, `units` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __new__ (cls, fi, fin=None, Error=<class 'pygeodesy.errors.UnitError'>, **name) Static Method |
New, named Fractional Index in a `list` or `tuple` of points. Arguments: `fi` - The fractional index (`float` or `int`). `fin` - Optional `len`, the number of `points`, the index `[n]` wrapped to `[0]` (`int` or `None`). `Error` - Optional error to raise. `name` - Optional `name=NN` (`str`). Returns: a new object with type S, a subtype of T A named `fi` (FIx). Raises: `Error` - Invalid `arg` or `arg` below `low` or above `high`. Overrides: object.__new__ Note: The returned `fi` may exceed the `len`, number of original `points` in certain open/closed cases. See Also: Method fractional or function pygeodesy.fractional.

### fractional (self, points, wrap=None, **LatLon_or_Vector_and_kwds) |
Return the point at this Fractional Index. Arguments: `points` - The points (`LatLon`[], Numpy2LatLon[], Tuple2LatLon[] or `other`[]). `wrap` - If `True`, wrap or normalize and unroll the `points` (`bool`) or `None` for backward compatible LatLon2Tuple or `LatLon` with averaged lat- and longitudes. `LatLon_or_Vector_and_kwds` - Optional `LatLon=None` or `Vector=None` to return the intermediate, fractional point and optional, additional `LatLon` or `Vector` keyword arguments, see function fractional. Returns: See function fractional. Raises: `IndexError` - In fractional index invalid or `points` not subscriptable or not closed. `TypeError` - Invalid `LatLon`, `Vector` or `kwds` argument. See Also: Function pygeodesy.fractional.

Property Details

### fin Get the given `len`, the index `[n]` wrapped to `[0]` (`int`). Get method: fin(self) - Get the given `len`, the index `[n]` wrapped to `[0]` (`int`). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.