# Internal documentation

This page documents the internal types and methods of Manifolds.jl's that might be of use for writing your own manifold.

## Functions

Manifolds.eigen_safeFunction
eigen_safe(x)

Compute the eigendecomposition of x. If x is a StaticMatrix, it is converted to a Matrix before the decomposition.

source
Manifolds.find_pvFunction
find_pv(x...)

A = find_pv(x...) returns the first ProductArray among the arguments.

source
Manifolds.log_safeFunction
log_safe(x)

Compute the matrix logarithm of x. If x is a StaticMatrix, it is converted to a Matrix before computing the log.

source
Manifolds.nzsignFunction
nzsign(z[, absz])

Compute a modified sign(z) that is always nonzero, i.e. where

$$$\operatorname(nzsign)(z) = \begin{cases} 1 & \text{if } z = 0\\ \frac{z}{|z|} & \text{otherwise} \end{cases}$$$
source
ManifoldsBase.size_to_tupleFunction
size_to_tuple(::Type{S}) where S<:Tuple

Converts a size given by Tuple{N, M, ...} into a tuple (N, M, ...).

Manifolds.select_from_tupleFunction
select_from_tuple(t::NTuple{N, Any}, positions::Val{P})

Selects elements of tuple t at positions specified by the second argument. For example select_from_tuple(("a", "b", "c"), Val((3, 1, 1))) returns ("c", "a", "a").

source
Manifolds.usincFunction
usinc(θ::Real)

Unnormalized version of sinc function, i.e. $\operatorname{usinc}(θ) = \frac{\sin(θ)}{θ}$. This is equivalent to sinc(θ/π).

source
Manifolds.usinc_from_cosFunction
usinc_from_cos(x::Real)

Unnormalized version of sinc function, i.e. $\operatorname{usinc}(θ) = \frac{\sin(θ)}{θ}$, computed from $x = cos(θ)$.

source
Manifolds.vec2skew!Function
vec2skew!(X, v, k)

create a skew symmetric matrix inplace in X of size $k\times k$ from a vector v, for example for v=[1,2,3] and k=3 this yields

[  0  1  2;
-1  0  3;
-2 -3  0
]
source
Manifolds.ziptuplesFunction
ziptuples(a, b[, c[, d[, e]]])

Zips tuples a, b, and remaining in a fast, type-stable way. If they have different lengths, the result is trimmed to the length of the shorter tuple.

source