Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
Public Member Functions | List of all members
mc::geom::Point< dim > Class Template Reference

N-dimensional point representation. More...

#include <geometry.hpp>

Collaboration diagram for mc::geom::Point< dim >:

Public Member Functions

 Point ()
 Default constructor initializing all coordinates to 0.0.
 
double & operator[] (std::size_t i)
 Non-const coordinate accessor.
 
double operator[] (std::size_t i) const
 Const coordinate accessor.
 
std::size_t dimension () const
 Get the dimensionality of the point.
 

Detailed Description

template<int dim>
class mc::geom::Point< dim >

N-dimensional point representation.

Template Parameters
dimDimensionality of the point

Provides a lightweight container for coordinates in dim-dimensional space. Supports index-based access to individual coordinates.

Definition at line 31 of file geometry.hpp.

Constructor & Destructor Documentation

◆ Point()

template<int dim>
mc::geom::Point< dim >::Point ( )
inline

Default constructor initializing all coordinates to 0.0.

Definition at line 35 of file geometry.hpp.

Member Function Documentation

◆ dimension()

template<int dim>
std::size_t mc::geom::Point< dim >::dimension ( ) const
inline

Get the dimensionality of the point.

Returns
Number of dimensions

Definition at line 55 of file geometry.hpp.

◆ operator[]() [1/2]

template<int dim>
double & mc::geom::Point< dim >::operator[] ( std::size_t  i)
inline

Non-const coordinate accessor.

Parameters
iCoordinate index (0 to dim-1)
Returns
Reference to the i-th coordinate

Definition at line 42 of file geometry.hpp.

◆ operator[]() [2/2]

template<int dim>
double mc::geom::Point< dim >::operator[] ( std::size_t  i) const
inline

Const coordinate accessor.

Parameters
iCoordinate index (0 to dim-1)
Returns
Value of the i-th coordinate

Definition at line 49 of file geometry.hpp.


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