|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
A class that describes a point with spacedim spatial dimension space. More...
#include <geom_point.h>

Public Types | |
| typedef T | value_type |
| value_type. The type of the coordinates | |
Public Member Functions | |
| 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 | |
| GeomPoint & | operator= (const GeomPoint &t) |
| copy assignement operator | |
| virtual | ~GeomPoint () |
| dtor | |
| GeomPoint & | operator+= (const GeomPoint &) |
| Add another vector, i.e. move this point by the given offset. | |
| GeomPoint & | operator-= (const GeomPoint &) |
| \detailed Subtract another tensor. | |
| GeomPoint & | operator*= (T factor) |
| Scale the point by factor. | |
| GeomPoint & | operator/= (T factor) |
| Scale the vector by factor. | |
| GeomPoint & | operator= (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. | |
| T & | operator[] (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. | |
Static Public Attributes | |
| static const int | dimension = spacedim |
| dimension. Spatial dimension of the point | |
A class that describes a point with spacedim spatial dimension space.
| typedef T bitrl::utils::geom::GeomPoint< spacedim, T >::value_type |
value_type. The type of the coordinates
|
inlineexplicit |
ctor all dim data are assigned the given value
|
inlineexplicit |
Create by passing a vector of data.
| bitrl::utils::geom::GeomPoint< spacedim, T >::GeomPoint | ( | const std::initializer_list< T > & | list | ) |
Construct given an initializer_list.
|
inline |
copy ctor
|
inlinevirtual |
dtor
|
inline |
Add the coordinates of the given point to this scaled by factor.
|
inline |
Get a copy of the data of this object.
| T bitrl::utils::geom::GeomPoint< spacedim, T >::distance | ( | const GeomPoint< spacedim, T > & | p | ) | const |
Get the distance from the given point.
Returns the dot product of this point and the given point.
|
inline |
access the i-th coordinate of the point read-only
|
inline |
Return the distance from the origin.
Get the max element in the point.
Get the min element in the point.
|
inline |
Scale the point by factor.
|
inline |
Add another vector, i.e. move this point by the given offset.
|
inline |
\detailed Subtract another tensor.
|
inline |
Scale the vector by factor.
|
inline |
copy assignement operator
|
inline |
operator = Assign from the initializer list
|
inline |
Access the i-th coordinate of the point.
|
inline |
Access the i-th coordinate of the point read-only.
|
inline |
print the point
scale this object by the given factors p factors should have size at least spacedim
| void bitrl::utils::geom::GeomPoint< spacedim, T >::scale | ( | T | factor | ) |
scale with a given factor
| T bitrl::utils::geom::GeomPoint< spacedim, T >::square_sum | ( | ) | const |
Returns the square sum of the compontents.
| const std::string bitrl::utils::geom::GeomPoint< spacedim, T >::to_string | ( | ) | const |
Returns string representation of the point.
|
inline |
Zero the entries of the tensor.
dimension. Spatial dimension of the point