bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
bitrl::utils::trajectory::WayPoint< dim, Data > Class Template Reference

Helper class to represent a waypoint. More...

#include <waypoint.h>

Inheritance diagram for bitrl::utils::trajectory::WayPoint< dim, Data >:
Collaboration diagram for bitrl::utils::trajectory::WayPoint< dim, Data >:

Public Types

typedef Data data_type
 
- Public Types inherited from bitrl::utils::geom::GeomPoint< spacedim, T >
typedef T value_type
 value_type. The type of the coordinates
 

Public Member Functions

 WayPoint ()
 
 WayPoint (const GeomPoint< dim > &p, uint_t id, const data_type &data_=data_type())
 
uint_t get_id () const
 Return the id of the point.
 
data_typeget_data ()
 Writable reference to the data.
 
const data_typeget_data () const
 Read reference to the data.
 
bool is_active () const
 Returns true if the waypoint is active.
 
- Public Member Functions inherited from bitrl::utils::geom::GeomPoint< spacedim, T >
 GeomPoint (T val=T())
 ctor all dim data are assigned the given value
 
template<typename Container >
 GeomPoint (const Container &data)
 Create by passing a vector of data.
 
 GeomPoint (const std::initializer_list< T > &list)
 Construct given an initializer_list.
 
 GeomPoint (const GeomPoint &t)
 copy ctor
 
GeomPointoperator= (const GeomPoint &t)
 copy assignement operator
 
virtual ~GeomPoint ()
 dtor
 
GeomPointoperator+= (const GeomPoint &)
 Add another vector, i.e. move this point by the given offset.
 
GeomPointoperator-= (const GeomPoint &)
 \detailed Subtract another tensor.
 
GeomPointoperator*= (T factor)
 Scale the point by factor.
 
GeomPointoperator/= (T factor)
 Scale the vector by factor.
 
GeomPointoperator= (const std::initializer_list< T > &list)
 operator = Assign from the initializer list
 
void scale (T factor)
 scale with a given factor
 
void scale (const std::vector< T > &factors)
 scale this object by the given factors p factors should have size at least spacedim
 
void zero ()
 Zero the entries of the tensor.
 
void add_scaled (const GeomPoint &p, T factor)
 Add the coordinates of the given point to this scaled by factor.
 
Toperator[] (uint_t i)
 Access the i-th coordinate of the point.
 
T operator[] (uint_t i) const
 Access the i-th coordinate of the point read-only.
 
T entry (uint_t i) const
 access the i-th coordinate of the point read-only
 
auto coordinates () const
 Get a copy of the data of this object.
 
T max () const
 Get the max element in the point.
 
T min () const
 Get the min element in the point.
 
T distance (const GeomPoint &) const
 Get the distance from the given point.
 
T L2_norm () const
 Return the distance from the origin.
 
T dot (const GeomPoint &other) const
 Returns the dot product of this point and the given point.
 
T square_sum () const
 Returns the square sum of the compontents.
 
std::ostream & print_point_info (std::ostream &out) const
 print the point
 
const std::string to_string () const
 Returns string representation of the point.
 

Additional Inherited Members

- Static Public Attributes inherited from bitrl::utils::geom::GeomPoint< spacedim, T >
static const int dimension = spacedim
 dimension. Spatial dimension of the point
 

Detailed Description

template<int dim, typename Data>
class bitrl::utils::trajectory::WayPoint< dim, Data >

Helper class to represent a waypoint.

Member Typedef Documentation

◆ data_type

Constructor & Destructor Documentation

◆ WayPoint() [1/2]

template<int dim, typename Data >
bitrl::utils::trajectory::WayPoint< dim, Data >::WayPoint ( )

constructor

◆ WayPoint() [2/2]

template<int dim, typename Data >
bitrl::utils::trajectory::WayPoint< dim, Data >::WayPoint ( const GeomPoint< dim > &  p,
uint_t  id,
const data_type data_ = data_type() 
)

constructor

Member Function Documentation

◆ get_data() [1/2]

template<int dim, typename Data >
data_type & bitrl::utils::trajectory::WayPoint< dim, Data >::get_data ( )
inline

Writable reference to the data.

◆ get_data() [2/2]

template<int dim, typename Data >
const data_type & bitrl::utils::trajectory::WayPoint< dim, Data >::get_data ( ) const
inline

Read reference to the data.

◆ get_id()

template<int dim, typename Data >
uint_t bitrl::utils::trajectory::WayPoint< dim, Data >::get_id ( ) const
inline

Return the id of the point.

◆ is_active()

template<int dim, typename Data >
bool bitrl::utils::trajectory::WayPoint< dim, Data >::is_active ( ) const
inline

Returns true if the waypoint is active.


The documentation for this class was generated from the following file: