Classes | Defines | Functions
Util.h File Reference
#include <bwi_tools/json/json.h>
#include <boost/function.hpp>
#include <string>
#include <vector>
#include <ostream>
#include <map>
#include <sys/time.h>
Include dependency graph for Util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Timer

Defines

#define NULL   0

Functions

double getTime ()
std::string indent (unsigned int indentation)
void jsonReplaceStrings (Json::Value &value, const std::map< std::string, std::string > &replacementMap)
void jsonReplaceStrings (Json::Value &value, boost::function< void(Json::Value &)> replace)
template<class T >
T max (const T &x1, const T &x2)
template<class T >
T min (const T &x1, const T &x2)
template<class T >
std::ostream & operator<< (std::ostream &out, const std::vector< T > &vect)
bool readJson (const std::string &filename, Json::Value &value)
template<class T >
int sgn (const T &x)
float softmax (float x1, float x2, float factor)
void softmax (const std::vector< unsigned int > &vals, float factor, std::vector< float > &probs)
std::string tempFilename ()
void tic (int id=0)
double toc (int id=0)
void toc (double &counter, int id=0)
void vectorMax (const std::vector< float > &arr, float &maxVal, unsigned int &maxInd)
unsigned int vectorMaxInd (const std::vector< float > &arr)

Define Documentation

#define NULL   0

Definition at line 21 of file Util.h.


Function Documentation

double getTime ( ) [inline]

Definition at line 24 of file Util.h.

std::string indent ( unsigned int  indentation)

Definition at line 133 of file Util.cpp.

void jsonReplaceStrings ( Json::Value value,
const std::map< std::string, std::string > &  replacementMap 
)

Definition at line 113 of file Util.cpp.

void jsonReplaceStrings ( Json::Value value,
boost::function< void(Json::Value &)>  replace 
)

Definition at line 117 of file Util.cpp.

template<class T >
T max ( const T x1,
const T x2 
) [inline]

Definition at line 59 of file Util.h.

template<class T >
T min ( const T x1,
const T x2 
) [inline]

Definition at line 54 of file Util.h.

template<class T >
std::ostream& operator<< ( std::ostream &  out,
const std::vector< T > &  vect 
)

Definition at line 77 of file Util.h.

bool readJson ( const std::string &  filename,
Json::Value value 
)

Definition at line 66 of file Util.cpp.

template<class T >
int sgn ( const T x) [inline]

Definition at line 49 of file Util.h.

float softmax ( float  x1,
float  x2,
float  factor 
)

Definition at line 44 of file Util.cpp.

void softmax ( const std::vector< unsigned int > &  vals,
float  factor,
std::vector< float > &  probs 
)

Definition at line 51 of file Util.cpp.

std::string tempFilename ( )

Definition at line 137 of file Util.cpp.

void tic ( int  id = 0)

Definition at line 13 of file Util.cpp.

double toc ( int  id = 0)

Definition at line 17 of file Util.cpp.

void toc ( double &  counter,
int  id = 0 
)

Definition at line 21 of file Util.cpp.

void vectorMax ( const std::vector< float > &  arr,
float &  maxVal,
unsigned int &  maxInd 
)

Definition at line 33 of file Util.cpp.

unsigned int vectorMaxInd ( const std::vector< float > &  arr)

Definition at line 25 of file Util.cpp.



bwi_tools
Author(s): Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:26