KADATH
Kadath::Point Class Reference

The class Point is used to store the coordinates of a point. More...

#include <point.hpp>

Inheritance diagram for Kadath::Point:

Public Member Functions

 Point (int n)
 Standard constructor (the coordinates are not affected). More...
 
 Point (FILE *)
 Constructor from a file. More...
 
void save (FILE *) const
 Saving function. More...
 
double & set (int i)
 Read/write of a coordinate. More...
 
double operator() (int i) const
 Read only access to a coordinate. More...
 
const int & get_ndim () const
 Returns the number of dimensions. More...
 

Protected Attributes

int ndim
 Number of dimensions. More...
 
Memory_mapped_array< double > coord
 Array on the coordinates (mainly designed for absolute Cartesian coordinates). More...
 

Friends

ostream & operator<< (ostream &, const Point &)
 Display. More...
 

Detailed Description

The class Point is used to store the coordinates of a point.

Definition at line 30 of file point.hpp.

Constructor & Destructor Documentation

◆ Point() [1/2]

Kadath::Point::Point ( int  n)
inlineexplicit

Standard constructor (the coordinates are not affected).

Parameters
n[input] : number of dimensions.

Definition at line 40 of file point.hpp.

References coord, and ndim.

◆ Point() [2/2]

Kadath::Point::Point ( FILE *  fd)

Constructor from a file.

Definition at line 26 of file point.cpp.

References coord, and ndim.

Member Function Documentation

◆ get_ndim()

const int& Kadath::Point::get_ndim ( ) const
inline

Returns the number of dimensions.

Definition at line 51 of file point.hpp.

References ndim.

◆ operator()()

double Kadath::Point::operator() ( int  i) const
inline

Read only access to a coordinate.

Definition at line 49 of file point.hpp.

References coord, and ndim.

◆ save()

void Kadath::Point::save ( FILE *  fd) const

Saving function.

Definition at line 33 of file point.cpp.

References coord, and ndim.

◆ set()

double& Kadath::Point::set ( int  i)
inline

Read/write of a coordinate.

Definition at line 47 of file point.hpp.

References coord, and ndim.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  o,
const Point so 
)
friend

Display.

Definition at line 38 of file point.cpp.

Member Data Documentation

◆ coord

Memory_mapped_array<double> Kadath::Point::coord
protected

Array on the coordinates (mainly designed for absolute Cartesian coordinates).

Definition at line 33 of file point.hpp.

◆ ndim

int Kadath::Point::ndim
protected

Number of dimensions.

Definition at line 32 of file point.hpp.


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