SWPositionSampler Class Reference

CPP API: SWPositionSampler Class Reference

A Sampler for sampling a position for the singlewell potential F(x,y) = (x^4 + y^4)/2, see SingleWell. More...

#include <single_well.h>

Public Types

using Position = Eigen::Vector2d
 

Public Member Functions

Position operator() () const
 Sampling a position within [bottom_left.x + margin, bottom_left.y + margin] x [top_right.x - margin, top_right.y - margin]. More...
 
 SWPositionSampler (const Position &bottom_left, const Position &top_right, ScalarType margin)
 Create a sampler. More...
 

Private Attributes

std::pair< Position, Positionm_range
 

Detailed Description

A Sampler for sampling a position for the singlewell potential F(x,y) = (x^4 + y^4)/2, see SingleWell.

Member Typedef Documentation

◆ Position

using SWPositionSampler::Position = Eigen::Vector2d

Constructor & Destructor Documentation

◆ SWPositionSampler()

SWPositionSampler::SWPositionSampler ( const Position bottom_left,
const Position top_right,
ScalarType  margin 
)
inline

Create a sampler.

Parameters
[in]bottom_leftCoordinates of the bottom left corner of the range in which should be samples.
[in]top_rightCoordinates of the top right corner of the range in which should be samples.
[in]marginMargin defining the distance that should be kept from the borders defined by bottom_left and top_right when sampling a position.

Member Function Documentation

◆ operator()()

Position SWPositionSampler::operator() ( ) const
inline

Sampling a position within [bottom_left.x + margin, bottom_left.y + margin] x [top_right.x - margin, top_right.y - margin].

Member Data Documentation

◆ m_range

std::pair<Position, Position> SWPositionSampler::m_range
private