VAPoR  3.0.0
Classes | Functions | Variables
VetsUtil Namespace Reference

Classes

class  MyBase
 VetsUtil base class. More...
 

Functions

COMMON_API int IsOdd (int x)
 
COMMON_API int IsPowerOfTwo (unsigned int x)
 Return true if power of two. More...
 
COMMON_API int Min (int a, int b)
 
COMMON_API int Max (int a, int b)
 
COMMON_API size_t Min (size_t a, size_t b)
 
COMMON_API size_t Max (size_t a, size_t b)
 
COMMON_API float Min (float a, float b)
 
COMMON_API float Max (float a, float b)
 
COMMON_API double Min (double a, double b)
 
COMMON_API double Max (double a, double b)
 
COMMON_API double LogBaseN (double x, double n)
 
COMMON_API int ILog2 (int n)
 
COMMON_API int StrCmpNoCase (const string &s, const string &t)
 Case-insensitive string comparison. More...
 
COMMON_API void StrRmWhiteSpace (string &s)
 Remove white space from a string. More...
 
COMMON_API void StrToWordVec (const string &s, vector< string > &v)
 Parse a string, returning a vector of words. More...
 
std::vector< std::string > & SplitString (const std::string &s, char delim, std::vector< std::string > &elems)
 
std::vector< size_t > & SplitString (const std::string &s, char delim, std::vector< size_t > &elems)
 
std::vector< int > & SplitString (const std::string &s, char delim, std::vector< int > &elems)
 
std::vector< float > & SplitString (const std::string &s, char delim, std::vector< float > &elems)
 
std::vector< double > & SplitString (const std::string &s, char delim, std::vector< double > &elems)
 
COMMON_API unsigned long long GetBits64 (unsigned long long targ, int pos, int n)
 
COMMON_API unsigned long long SetBits64 (unsigned long long targ, int pos, int n, unsigned long long src)
 
COMMON_API double ran1 (long *)
 

Variables

const float ABOVE_GRID = 0.f
 
const float BELOW_GRID = 0.f
 

Function Documentation

COMMON_API unsigned long long VetsUtil::GetBits64 ( unsigned long long  targ,
int  pos,
int  n 
)

Retrieve a sequence of bits

Extract n bits from targ starting at position pos counting from the left. E.g. GetBits64(I,4,3) will extract bits at bit position 4,3,2, right adjusted

Return values
returnsthe extracted bits
See also
GetBits64()
COMMON_API int VetsUtil::ILog2 ( int  n)
COMMON_API int VetsUtil::IsOdd ( int  x)
inline

Definition at line 270 of file MyBase.h.

COMMON_API int VetsUtil::IsPowerOfTwo ( unsigned int  x)

Return true if power of two.

Returns a non-zero value if the input parameter is a power of two

Parameters
[in]xAn integer
Return values
status
COMMON_API double VetsUtil::LogBaseN ( double  x,
double  n 
)
inline

Definition at line 292 of file MyBase.h.

COMMON_API int VetsUtil::Max ( int  a,
int  b 
)
inline

Definition at line 280 of file MyBase.h.

Referenced by VAPoR::DataStatus::getMaxStretchedSize().

COMMON_API size_t VetsUtil::Max ( size_t  a,
size_t  b 
)
inline

Definition at line 283 of file MyBase.h.

COMMON_API float VetsUtil::Max ( float  a,
float  b 
)
inline

Definition at line 286 of file MyBase.h.

COMMON_API double VetsUtil::Max ( double  a,
double  b 
)
inline

Definition at line 289 of file MyBase.h.

COMMON_API int VetsUtil::Min ( int  a,
int  b 
)
inline

Definition at line 279 of file MyBase.h.

COMMON_API size_t VetsUtil::Min ( size_t  a,
size_t  b 
)
inline

Definition at line 282 of file MyBase.h.

COMMON_API float VetsUtil::Min ( float  a,
float  b 
)
inline

Definition at line 285 of file MyBase.h.

COMMON_API double VetsUtil::Min ( double  a,
double  b 
)
inline

Definition at line 288 of file MyBase.h.

COMMON_API double VetsUtil::ran1 ( long *  )
COMMON_API unsigned long long VetsUtil::SetBits64 ( unsigned long long  targ,
int  pos,
int  n,
unsigned long long  src 
)

Set a sequence of bits

Set n bits in targ starting at position pos counting from the left. The bits are obtained from src

Return values
returnswith the indicated bits set
See also
GetBits64()
std::vector<std::string>& VetsUtil::SplitString ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)
std::vector<size_t>& VetsUtil::SplitString ( const std::string &  s,
char  delim,
std::vector< size_t > &  elems 
)
std::vector<int>& VetsUtil::SplitString ( const std::string &  s,
char  delim,
std::vector< int > &  elems 
)
std::vector<float>& VetsUtil::SplitString ( const std::string &  s,
char  delim,
std::vector< float > &  elems 
)
std::vector<double>& VetsUtil::SplitString ( const std::string &  s,
char  delim,
std::vector< double > &  elems 
)
COMMON_API int VetsUtil::StrCmpNoCase ( const string &  s,
const string &  t 
)

Case-insensitive string comparison.

Performs a case-insensitive comparison of two C++ strings. Behaviour is otherwise identical to the C++ std::string.compare() method.

COMMON_API void VetsUtil::StrRmWhiteSpace ( string &  s)

Remove white space from a string.

Performs in-place removal of all white space from a string.

Parameters
[in,out]sThe string.
COMMON_API void VetsUtil::StrToWordVec ( const string &  s,
vector< string > &  v 
)

Parse a string, returning a vector of words.

Parses a string containing a white-space delimited collection of words. The words are in order of occurence and returned as a vector of strings with all white space removed.

Parameters
[in]sThe input string.
[out]vThe output vector.

Variable Documentation

const float VetsUtil::ABOVE_GRID = 0.f

Definition at line 60 of file MyBase.h.

const float VetsUtil::BELOW_GRID = 0.f

Definition at line 61 of file MyBase.h.