ClampedLogSqBarrier

template <typename T = double>
class ClampedLogSqBarrier : public ipc::BarrierBase<double>;

Inheritance diagram for ipc::ClampedLogSqBarrier:

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

Collaboration diagram for ipc::ClampedLogSqBarrier:

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

Clamped log barrier with a quadratic log term from [Huang et al. 2024].

Public Functions

ClampedLogSqBarrier() = default;
virtual T operator()(const T dconst T dhat) const override;

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

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

Parameters:
const T d

The distance.

const T dhat

Activation distance of the barrier.

Returns:

The value of the barrier function at d.

virtual T first_derivative(const T dconst T dhat) const override;

Derivative of the barrier function.

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

Parameters:
const T d

The distance.

const T dhat

Activation distance of the barrier.

Returns:

The derivative of the barrier wrt d.

virtual T second_derivative(const T dconst T dhat) const override;

Second derivative of the barrier function.

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

Parameters:
const T d

The distance.

const T dhat

Activation distance of the barrier.

Returns:

The second derivative of the barrier wrt d.

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

Get the units of the barrier function.

Parameters:
const T dhat

The activation distance of the barrier.

Returns:

The units of the barrier function.