ClampedLogSqBarrier

class ClampedLogSqBarrier : public ipc::Barrier;

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::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::ClampedLogSqBarrier" tooltip="ipc::ClampedLogSqBarrier" 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::Barrier" tooltip="ipc::Barrier"] "1" [label="ipc::ClampedLogSqBarrier" tooltip="ipc::ClampedLogSqBarrier" 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 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^2\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.

virtual double first_derivative(
    
const double dconst double 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 double d

The distance.

const double dhat

Activation distance of the barrier.

Returns:

The derivative of the barrier wrt d.

virtual double second_derivative(
    
const double dconst double 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 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.