rawdist

package
v0.0.0-...-d35a074 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package rawdist provide discretized spherical distribution types, that are un-normalized, that is, they do not sum to one, and its the responsibility of the caller to make the appropriate integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Normal

type Normal struct {
	// contains filtered or unexported fields
}

Normal is an unscaled discretization of an spherical normal distribution.

It is based on equation (2) from Hauberg (2018) 2018 IEEE FUSION: 704 <doi:10.23919/ICIF.2018.8455242>:

SN(x|u,v) ∝ exp(-λ * gcd(x,u)^2/2)

where x and u are points on a sphere, u is the mean, λ is the concentration parameter (in 1/radian^2), and gcd is the great circle distance.

func NewNormal

func NewNormal(lambda float64, scale int) Normal

NewNormal returns an unscaled and discretized spherical normal distribution, using lambda as the concentration parameter (in 1/radian^2) using scale as the discretization scale for the distance.

func (Normal) Lambda

func (n Normal) Lambda() float64

Lambda returns the concentration parameter (in 1/radian^2) of the spherical normal distribution.

func (Normal) LogProb

func (n Normal) LogProb(dist float64) float64

LogProb returns the natural logarithm of the probability density function at a distance dist (in radian).

func (Normal) LogProbRingDist

func (n Normal) LogProbRingDist(dist int) float64

LogProbRingDist returns the natural logarithm of the probability density function at a given int scaled distance.

func (Normal) Prob

func (n Normal) Prob(dist float64) float64

Prob returns the value of the probability density function at a distance dist (in radian).

func (Normal) ProbRingDist

func (n Normal) ProbRingDist(dist int) float64

ProbRingDist returns the value of the probability density function at a given int scaled distance.

func (Normal) ScaledProb

func (n Normal) ScaledProb(dist float64) float64

ScaledProb returns the value of the probability density function for a pixel at a distance dist (in radian) scaled by the maximum probability (i.e., by 0 distance).

func (Normal) ScaledProbRingDist

func (n Normal) ScaledProbRingDist(dist int) float64

ScaledProbRingDist returns the value of the probability density function at a given int scaled distance scaled by the maximum probability (i.e., by 0 distance).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL