CubicBarrier

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

Inheritance diagram for ipc::CubicBarrier:

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::CubicBarrier< T >" tooltip="ipc::CubicBarrier< T >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::CubicBarrier:

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::CubicBarrier< T >" tooltip="ipc::CubicBarrier< T >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Cubic barrier function from [Ando 2024].

Public Functions

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

Weak barrier function.

\[ b(d) = -\frac{2}{3\hat{d}} (d - \hat{d})^3 \]

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})^2 \]

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) = -4 (d - \hat{d}) \]

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.