Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
Public Member Functions | Private Member Functions | List of all members
JMATH::make_carray Struct Reference

void function More...

#include <JMathlib.hh>

Inheritance diagram for JMATH::make_carray:
std::vector< double >

Public Member Functions

template<class ... Args>
 make_carray (const Args &...args)
 Constructor. More...
 
 operator const double * () const
 Type conversion operator. More...
 

Private Member Functions

template<class ... Args>
void add (const double x, const Args &...args)
 Recursive method for adding values to array. More...
 
void add (const double x)
 Termination method for adding values to array. More...
 

Detailed Description

void function

Auxiliary data structure to make C-array from list of values.

Definition at line 30 of file JMathlib.hh.

Constructor & Destructor Documentation

◆ make_carray()

template<class ... Args>
JMATH::make_carray::make_carray ( const Args &...  args)
inline

Constructor.

Parameters
argslist of values

Definition at line 39 of file JMathlib.hh.

40  {
41  add(args...);
42  }
void add(const double x, const Args &...args)
Recursive method for adding values to array.
Definition: JMathlib.hh:63

Member Function Documentation

◆ operator const double *()

JMATH::make_carray::operator const double * ( ) const
inline

Type conversion operator.

Returns
pointer to list of values

Definition at line 50 of file JMathlib.hh.

51  {
52  return this->data();
53  }

◆ add() [1/2]

template<class ... Args>
void JMATH::make_carray::add ( const double  x,
const Args &...  args 
)
inlineprivate

Recursive method for adding values to array.

Parameters
xfirst value
argsremaining values

Definition at line 63 of file JMathlib.hh.

64  {
65  this->push_back(x);
66 
67  add(args...);
68  }

◆ add() [2/2]

void JMATH::make_carray::add ( const double  x)
inlineprivate

Termination method for adding values to array.

Parameters
xfinal value

Definition at line 76 of file JMathlib.hh.

77  {
78  this->push_back(x);
79  }

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