ClampedLogBarrier

class ClampedLogBarrier : public ipc::Barrier;

Inheritance diagram for ipc::ClampedLogBarrier:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::ClampedLogBarrier" tooltip="ipc::ClampedLogBarrier" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::ClampedLogBarrier:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::ClampedLogBarrier" tooltip="ipc::ClampedLogBarrier" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Smoothly clamped log barrier functions from [Li et al. 2020].

Public Functions

ClampedLogBarrier() = default;
inline virtual double operator()(
    
const double dconst double dhat) const override;

Function that grows to infinity as d approaches 0 from the right.

\[ b(d) = -(d-\hat{d})^2\ln\left(\frac{d}{\hat{d}}\right) \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The value of the barrier function at d.

inline virtual double first_derivative(
    
const double dconst double dhat) const override;

Derivative of the barrier function.

\[ b'(d) = (\hat{d}-d) \left( 2\ln\left( \frac{d}{\hat{d}} \right) - \frac{\hat{d}}{d} + 1\right) \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The derivative of the barrier wrt d.

inline virtual double second_derivative(
    
const double dconst double dhat) const override;

Second derivative of the barrier function.

\[ b''(d) = \left( \frac{\hat{d}}{d} + 2 \right) \frac{\hat{d}}{d} - 2\ln\left( \frac{d}{\hat{d}} \right) - 3 \]

Parameters:
const double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The second derivative of the barrier wrt d.

inline virtual double units(const double dhat) const override;

Get the units of the barrier function.

Parameters:
const double dhat

The activation distance of the barrier.

Returns:

The units of the barrier function.