Barrier

template <typename T = double> class BarrierBase;

Inheritance diagram for ipc::BarrierBase:

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

Base class for barrier functions.

Subclassed by ipc::ClampedLogBarrier< T >, ipc::ClampedLogSqBarrier< T >, ipc::CubicBarrier< T >, ipc::TwoStageBarrier< T >

Public Functions

BarrierBase() = default;
virtual ~BarrierBase() = default;
virtual T operator()(const T d, const T dhat) const = 0;

Evaluate the barrier function.

Parameters:
const T d

Distance.

const T dhat

Activation distance of the barrier.

Returns:

The value of the barrier function at d.

virtual T first_derivative(const T d, const T dhat) const = 0;

Evaluate the first derivative of the barrier function wrt d.

Parameters:
const T d

Distance.

const T dhat

Activation distance of the barrier.

Returns:

The value of the first derivative of the barrier function at d.

virtual T second_derivative(const T d, const T dhat) const = 0;

Evaluate the second derivative of the barrier function wrt d.

Parameters:
const T d

Distance.

const T dhat

Activation distance of the barrier.

Returns:

The value of the second derivative of the barrier function at d.

virtual T units(const T dhat) const = 0;

Get the units of the barrier function.

Essentially, barrier(d, d̂) / units(d̂) should be dimensionless.

Parameters:
const T dhat

The activation distance of the barrier.

Returns:

The units of the barrier function.

Protected Types

using value_type = T;