Public Member Functions | Static Public Attributes | List of all members
geographiclib.geomath.Math Class Reference
Inheritance diagram for geographiclib.geomath.Math:
Inheritance graph
[legend]

Public Member Functions

def AngDiff (x, y)
 
def AngNormalize (x)
 
def AngRound (x)
 
def atan2d (y, x)
 
def atanh (x)
 
def cbrt (x)
 
def copysign (x, y)
 
def isfinite (x)
 
def isnan (x)
 
def LatFix (x)
 
def log1p (x)
 
def norm (x, y)
 
def polyval (N, p, s, x)
 
def sincosd (x)
 
def sq (x)
 
def sum (u, v)
 
- Public Member Functions inherited from object
template<typename T >
T cast () &&
 
template<typename T >
T cast () const &
 
template<>
void cast () const &
 
 object ()=default
 
 object (const object &o)
 Copy constructor; always increases the reference count. More...
 
 object (handle h, borrowed_t)
 
 object (handle h, stolen_t)
 
 object (object &&other) noexcept
 Move constructor; steals the object from other and preserves its reference count. More...
 
objectoperator= (const object &other)
 
objectoperator= (object &&other) noexcept
 
 PYBIND11_DEPRECATED ("Use reinterpret_borrow<object>() or reinterpret_steal<object>()") object(handle h
 
handle release ()
 
 ~object ()
 Destructor; automatically calls handle::dec_ref() More...
 
- Public Member Functions inherited from handle
template<typename T >
T cast () const
 
template<>
void cast () const
 
bool check () const
 
const handledec_ref () const &
 
 handle ()=default
 The default constructor creates a handle with a nullptr-valued pointer. More...
 
template<typename T , detail::enable_if_t< detail::all_of< detail::none_of< std::is_base_of< handle, T >, detail::is_pyobj_ptr_or_nullptr_t< T >>, std::is_convertible< T, PyObject * >>::value, int > = 0>
 handle (T &obj)
 Enable implicit conversion through T::operator PyObject *(). More...
 
template<typename T , detail::enable_if_t< detail::is_pyobj_ptr_or_nullptr_t< T >::value, int > = 0>
 handle (T ptr)
 
const handleinc_ref () const &
 
 operator bool () const
 Return true when the handle wraps a valid Python object. More...
 
bool operator!= (const handle &h) const
 
bool operator== (const handle &h) const
 
PyObject *& ptr ()
 
PyObject * ptr () const
 Return the underlying PyObject * pointer. More...
 

Static Public Attributes

 AngDiff = staticmethod(AngDiff)
 
 AngNormalize = staticmethod(AngNormalize)
 
 AngRound = staticmethod(AngRound)
 
 atan2d = staticmethod(atan2d)
 
 atanh = staticmethod(atanh)
 
 cbrt = staticmethod(cbrt)
 
 copysign = staticmethod(copysign)
 
int digits = 53
 
 epsilon = math.pow(2.0, 1-digits)
 
int inf = float("inf") if sys.version_info > (2, 6) else 2 * maxval
 
 isfinite = staticmethod(isfinite)
 
 isnan = staticmethod(isnan)
 
 LatFix = staticmethod(LatFix)
 
 log1p = staticmethod(log1p)
 
 maxval = math.pow(2.0, 1023) * (2 - epsilon)
 
 minval = math.pow(2.0, -1022)
 
int nan = float("nan") if sys.version_info > (2, 6) else inf - inf
 
 norm = staticmethod(norm)
 
 polyval = staticmethod(polyval)
 
 sincosd = staticmethod(sincosd)
 
 sq = staticmethod(sq)
 
 sum = staticmethod(sum)
 

Additional Inherited Members

- Static Public Member Functions inherited from handle
static std::size_t inc_ref_counter ()
 
- Public Attributes inherited from object
bool is_borrowed: handle(h) { if (is_borrowed) { inc_ref()
 
- Protected Attributes inherited from handle
PyObject * m_ptr = nullptr
 

Detailed Description

Additional math routines for GeographicLib.

This defines constants:
  epsilon, difference between 1 and the next bigger number
  digits, the number of digits in the fraction of a real number
  minval, minimum normalized positive number
  maxval, maximum finite number
  nan, not a number
  inf, infinity

Definition at line 17 of file geomath.py.

Member Function Documentation

◆ AngDiff()

def geographiclib.geomath.Math.AngDiff (   x,
  y 
)
compute y - x and reduce to [-180,180] accurately

Definition at line 147 of file geomath.py.

◆ AngNormalize()

def geographiclib.geomath.Math.AngNormalize (   x)
reduce angle to (-180,180]

Definition at line 129 of file geomath.py.

◆ AngRound()

def geographiclib.geomath.Math.AngRound (   x)
Private: Round an angle so that small values underflow to zero.

Definition at line 115 of file geomath.py.

◆ atan2d()

def geographiclib.geomath.Math.atan2d (   y,
  x 
)
compute atan2(y, x) with the result in degrees

Definition at line 177 of file geomath.py.

◆ atanh()

def geographiclib.geomath.Math.atanh (   x)
atanh(x) (missing from python 2.5.2)

Definition at line 65 of file geomath.py.

◆ cbrt()

def geographiclib.geomath.Math.cbrt (   x)
Real cube root of a number

Definition at line 43 of file geomath.py.

◆ copysign()

def geographiclib.geomath.Math.copysign (   x,
  y 
)
return x with the sign of y (missing from python 2.5.2)

Definition at line 76 of file geomath.py.

◆ isfinite()

def geographiclib.geomath.Math.isfinite (   x)
Test for finiteness

Definition at line 196 of file geomath.py.

◆ isnan()

def geographiclib.geomath.Math.isnan (   x)
Test if nan

Definition at line 202 of file geomath.py.

◆ LatFix()

def geographiclib.geomath.Math.LatFix (   x)
replace angles outside [-90,90] by NaN

Definition at line 141 of file geomath.py.

◆ log1p()

def geographiclib.geomath.Math.log1p (   x)
log(1 + x) accurate for small x (missing from python 2.5.2)

Definition at line 50 of file geomath.py.

◆ norm()

def geographiclib.geomath.Math.norm (   x,
  y 
)
Private: Normalize a two-vector.

Definition at line 85 of file geomath.py.

◆ polyval()

def geographiclib.geomath.Math.polyval (   N,
  p,
  s,
  x 
)
Evaluate a polynomial.

Definition at line 106 of file geomath.py.

◆ sincosd()

def geographiclib.geomath.Math.sincosd (   x)
Compute sine and cosine of x in degrees.

Definition at line 155 of file geomath.py.

◆ sq()

def geographiclib.geomath.Math.sq (   x)
Square a number

Definition at line 37 of file geomath.py.

◆ sum()

def geographiclib.geomath.Math.sum (   u,
  v 
)
Error free transformation of a sum.

Definition at line 91 of file geomath.py.

Member Data Documentation

◆ AngDiff

geographiclib.geomath.Math.AngDiff = staticmethod(AngDiff)
static

Definition at line 153 of file geomath.py.

◆ AngNormalize

geographiclib.geomath.Math.AngNormalize = staticmethod(AngNormalize)
static

Definition at line 139 of file geomath.py.

◆ AngRound

geographiclib.geomath.Math.AngRound = staticmethod(AngRound)
static

Definition at line 127 of file geomath.py.

◆ atan2d

geographiclib.geomath.Math.atan2d = staticmethod(atan2d)
static

Definition at line 194 of file geomath.py.

◆ atanh

geographiclib.geomath.Math.atanh = staticmethod(atanh)
static

Definition at line 74 of file geomath.py.

◆ cbrt

geographiclib.geomath.Math.cbrt = staticmethod(cbrt)
static

Definition at line 48 of file geomath.py.

◆ copysign

geographiclib.geomath.Math.copysign = staticmethod(copysign)
static

Definition at line 83 of file geomath.py.

◆ digits

int geographiclib.geomath.Math.digits = 53
static

Definition at line 30 of file geomath.py.

◆ epsilon

geographiclib.geomath.Math.epsilon = math.pow(2.0, 1-digits)
static

Definition at line 31 of file geomath.py.

◆ inf

int geographiclib.geomath.Math.inf = float("inf") if sys.version_info > (2, 6) else 2 * maxval
static

Definition at line 34 of file geomath.py.

◆ isfinite

geographiclib.geomath.Math.isfinite = staticmethod(isfinite)
static

Definition at line 200 of file geomath.py.

◆ isnan

geographiclib.geomath.Math.isnan = staticmethod(isnan)
static

Definition at line 206 of file geomath.py.

◆ LatFix

geographiclib.geomath.Math.LatFix = staticmethod(LatFix)
static

Definition at line 145 of file geomath.py.

◆ log1p

geographiclib.geomath.Math.log1p = staticmethod(log1p)
static

Definition at line 63 of file geomath.py.

◆ maxval

geographiclib.geomath.Math.maxval = math.pow(2.0, 1023) * (2 - epsilon)
static

Definition at line 33 of file geomath.py.

◆ minval

geographiclib.geomath.Math.minval = math.pow(2.0, -1022)
static

Definition at line 32 of file geomath.py.

◆ nan

int geographiclib.geomath.Math.nan = float("nan") if sys.version_info > (2, 6) else inf - inf
static

Definition at line 35 of file geomath.py.

◆ norm

geographiclib.geomath.Math.norm = staticmethod(norm)
static

Definition at line 89 of file geomath.py.

◆ polyval

geographiclib.geomath.Math.polyval = staticmethod(polyval)
static

Definition at line 113 of file geomath.py.

◆ sincosd

geographiclib.geomath.Math.sincosd = staticmethod(sincosd)
static

Definition at line 175 of file geomath.py.

◆ sq

geographiclib.geomath.Math.sq = staticmethod(sq)
static

Definition at line 41 of file geomath.py.

◆ sum

geographiclib.geomath.Math.sum = staticmethod(sum)
static

Definition at line 104 of file geomath.py.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:23:29