NLMech  0.1.0
util::methods Namespace Reference

Provides fast methods to add/subtract list of data, to find maximum/minimum from list of data. More...

Functions

double add (const std::vector< double > &data)
 Returns the sum of data. More...
 
float add (const std::vector< float > &data)
 Returns the sum of data. More...
 
double max (const std::vector< double > &data, size_t *i=nullptr)
 Returns the maximum from list of data. More...
 
float max (const std::vector< float > &data, size_t *i=nullptr)
 Returns the maximum from list of data. More...
 
util::Point3 maxLength (const std::vector< util::Point3 > &data)
 Returns the maximum length of point from list of points. More...
 
double min (const std::vector< double > &data, size_t *i=nullptr)
 Returns the minimum from list of data. More...
 
float min (const std::vector< float > &data, size_t *i=nullptr)
 Returns the minimum from list of data. More...
 

Detailed Description

Provides fast methods to add/subtract list of data, to find maximum/minimum from list of data.

Function Documentation

◆ add() [1/2]

double util::methods::add ( const std::vector< double > &  data)

Returns the sum of data.

Parameters
dataList of real numbers
Returns
sum Sum of the numbers

Referenced by tools::pp::Compute::computeJIntegral(), and model::Output::Output().

Here is the caller graph for this function:

◆ add() [2/2]

float util::methods::add ( const std::vector< float > &  data)

Returns the sum of data.

Parameters
dataList of real numbers
Returns
sum Sum of the numbers

◆ max() [1/2]

double util::methods::max ( const std::vector< double > &  data,
size_t *  i = nullptr 
)

Returns the maximum from list of data.

Parameters
dataList of real numbers
iPointer to store the id where maximum occurs
Returns
max Maximum value

Referenced by model::FDModel< T >::checkOutputCriteria(), and tools::pp::Compute::updateCrack().

Here is the caller graph for this function:

◆ max() [2/2]

float util::methods::max ( const std::vector< float > &  data,
size_t *  i = nullptr 
)

Returns the maximum from list of data.

Parameters
dataList of real numbers
iPointer to store the id where maximum occurs
Returns
max Maximum value

◆ maxLength()

util::Point3 util::methods::maxLength ( const std::vector< util::Point3 > &  data)

Returns the maximum length of point from list of points.

Parameters
dataList of points
Returns
max Maximum length of point

◆ min() [1/2]

double util::methods::min ( const std::vector< double > &  data,
size_t *  i = nullptr 
)

Returns the minimum from list of data.

Parameters
dataList of real numbers
iPointer to store the id where minimum occurs
Returns
min Minimum value

Referenced by tools::pp::Compute::findTipInRects().

Here is the caller graph for this function:

◆ min() [2/2]

float util::methods::min ( const std::vector< float > &  data,
size_t *  i = nullptr 
)

Returns the minimum from list of data.

Parameters
dataList of real numbers
iPointer to store the id where minimum occurs
Returns
min Minimum value