UQTk: Uncertainty Quantification Toolkit 3.1.5
minmax.cpp File Reference

Tools to find min/max values of arrays. More...

#include "Array1D.h"
#include "Array2D.h"
#include <math.h>
#include "minmax.h"

Functions

void getDomain (Array2D< double > &data_in, Array1D< double > &a, Array1D< double > &b)
 Get domain of the data.
 
double maxVal (Array1D< double > &vector)
 Returns the maximum value of a 1d double array.
 
int maxVal (const Array1D< int > &vector)
 Returns the maximum value of a 1d int array.
 
double maxVal (const Array2D< double > &vector)
 Returns the maximum value of a 2d double array.
 
int maxVal (const Array2D< int > &vector)
 Returns the maximum value of a 2d int array.
 
double minVal (const Array1D< double > &vector)
 Returns the minimum value of a 1d double array.
 
int minVal (const Array1D< int > &vector)
 Returns the minimum value of a 1d int array.
 
double minVal (const Array2D< double > &vector)
 Returns the minimum value of a 2d double array.
 
int minVal (const Array2D< int > &vector)
 Returns the minimum value of a 2d int array.
 
int maxIndex (Array1D< double > &vector)
 Returns the index of the maximal value of a 1d double array.
 
int minIndex (Array1D< double > &vector)
 Returns the index of the minimal value of a 1d double array.
 
int maxIndex (Array1D< int > &vector)
 Returns the index of the maximal value of a 1d int array.
 
int minIndex (Array1D< int > &vector)
 Returns the index of the minimal value of a 1d int array.
 
int maxIndexC_2D (const Array2D< double > &a2d, const int icol)
 Returns the column number of the maximal element in the irow-th row of a 2d double array.
 
int minIndexC_2D (const Array2D< double > &a2d, const int icol)
 Returns the row number of the minimal element in the icol-th column of a 2d double array.
 

Detailed Description

Tools to find min/max values of arrays.

Function Documentation

◆ getDomain()

void getDomain ( Array2D< double > & data_in,
Array1D< double > & a,
Array1D< double > & b )

Get domain of the data.

◆ maxIndex() [1/2]

int maxIndex ( Array1D< double > & vector)

Returns the index of the maximal value of a 1d double array.

◆ maxIndex() [2/2]

int maxIndex ( Array1D< int > & vector)

Returns the index of the maximal value of a 1d int array.

◆ maxIndexC_2D()

int maxIndexC_2D ( const Array2D< double > & vector,
const int icol )

Returns the column number of the maximal element in the irow-th row of a 2d double array.

Returns the column number of the minimal element in the irow-th row of a 2d double array

Returns the row number of the maximal element in the icol-th column of a 2d double array

◆ maxVal() [1/4]

double maxVal ( Array1D< double > & vector)

Returns the maximum value of a 1d double array.

◆ maxVal() [2/4]

int maxVal ( const Array1D< int > & vector)

Returns the maximum value of a 1d int array.

◆ maxVal() [3/4]

double maxVal ( const Array2D< double > & vector)

Returns the maximum value of a 2d double array.

◆ maxVal() [4/4]

int maxVal ( const Array2D< int > & vector)

Returns the maximum value of a 2d int array.

◆ minIndex() [1/2]

int minIndex ( Array1D< double > & vector)

Returns the index of the minimal value of a 1d double array.

◆ minIndex() [2/2]

int minIndex ( Array1D< int > & vector)

Returns the index of the minimal value of a 1d int array.

◆ minIndexC_2D()

int minIndexC_2D ( const Array2D< double > & a2d,
const int icol )

Returns the row number of the minimal element in the icol-th column of a 2d double array.

◆ minVal() [1/4]

double minVal ( const Array1D< double > & vector)

Returns the minimum value of a 1d double array.

◆ minVal() [2/4]

int minVal ( const Array1D< int > & vector)

Returns the minimum value of a 1d int array.

◆ minVal() [3/4]

double minVal ( const Array2D< double > & vector)

Returns the minimum value of a 2d double array.

◆ minVal() [4/4]

int minVal ( const Array2D< int > & vector)

Returns the minimum value of a 2d int array.