Data Structures | Typedefs | Functions
InferenceEngine::details Namespace Reference

A namespace with non-public Inference Engine Plugin API. More...

Data Structures

class  CaselessEq
 
class  CaselessHash
 
class  CaselessLess
 Provides caseless comparison for STL algorithms. More...
 

Typedefs

template<class Key , class Value >
using caseless_unordered_map = std::unordered_map< Key, Value, CaselessHash< Key >, CaselessEq< Key > >
 
template<class Key , class Value >
using caseless_unordered_multimap = std::unordered_multimap< Key, Value, CaselessHash< Key >, CaselessEq< Key > >
 
template<class Key , class Value >
using caseless_map = std::map< Key, Value, CaselessLess< Key > >
 
template<class Key >
using caseless_set = std::set< Key, CaselessLess< Key > >
 

Functions

template<typename T >
std::ostream & operator<< (std::ostream &out, const std::vector< T > &vec)
 Serializes a std::vector to a std::ostream More...
 
void ltrim (std::string &s)
 trim from start (in place) More...
 
void rtrim (std::string &s)
 trim from end (in place) More...
 
std::string & trim (std::string &s)
 Trims std::string from both ends (in place) More...
 
std::vector< std::string > split (const std::string &src, const std::string &delimiter)
 split string into a vector of substrings More...
 
template<typename T , typename A >
std::string joinVec (std::vector< T, A > const &vec, std::string const &glue=std::string(","))
 create a string representation for a vector of values, without any suffixes or prefixes More...
 
template<typename T , typename A >
std::string dumpVec (std::vector< T, A > const &vec)
 create a string representation for a vector of values, enclosing text in a square brackets More...
 
template<typename T , typename A >
product (std::vector< T, A > const &vec)
 multiply vector's values More...
 
template<typename T , typename A >
bool equal (const std::vector< T, A > &v1, const std::vector< T, A > &v2)
 check if vectors contain same values More...
 
bool equal (const std::string &lhs, const std::string &rhs, bool ignoreCase=true)
 Checks whether two std::strings are equal. More...
 
bool endsWith (const std::string &src, const char *with)
 check string end with given substring More...
 
std::string tolower (const std::string &s)
 Converts all upper-case letters in a std::string to lower case. More...
 
template<typename C , typename T >
bool contains (const C &container, const T &element)
 Simple helper function to check element presence in container container must provede stl-compliant find member function. More...
 
template<typename Container , typename PredicateT >
void erase_if (Container &data, const PredicateT &predicate)
 Associative containers doesnt work with remove_if algorithm. More...
 
template<typename TIterator >
auto product (TIterator beg, TIterator en) -> typename std::remove_reference< decltype(*beg)>::type
 Multiplies container. More...
 
void clipping (int *idx, const int min, const int max)
 Clips element to be in range [min, max] More...
 
template<typename Set >
static Set Intersection (const Set &lhs, const Set &rhs)
 Set containers intersection. More...
 
template<typename Set >
static bool Intersects (const Set &lhs, const Set &rhs)
 Check whether two sets intersect. More...
 

Detailed Description

A namespace with non-public Inference Engine Plugin API.

Function Documentation

◆ clipping()

void InferenceEngine::details::clipping ( int *  idx,
const int  min,
const int  max 
)
inline

Clips element to be in range [min, max]

Parameters
idxThe pointer to element.
[in]minThe minimum value
[in]maxThe maximum value

◆ contains()

template<typename C , typename T >
bool InferenceEngine::details::contains ( const C container,
const T &  element 
)

Simple helper function to check element presence in container container must provede stl-compliant find member function.

Parameters
container- Container to check
element- element to check
Returns
true if element present in container

◆ erase_if()

template<typename Container , typename PredicateT >
void InferenceEngine::details::erase_if ( Container &  data,
const PredicateT &  predicate 
)
inline

Associative containers doesnt work with remove_if algorithm.

Template Parameters
ContainerT
PredicateT
Parameters
dataAn associative container
predicateA predicate to remove values conditionally

◆ Intersection()

template<typename Set >
static Set InferenceEngine::details::Intersection ( const Set &  lhs,
const Set &  rhs 
)
static

Set containers intersection.

Template Parameters
Set
Parameters
lhsFirst set container
rhsSecond set container
Returns
Set intersection

◆ Intersects()

template<typename Set >
static bool InferenceEngine::details::Intersects ( const Set &  lhs,
const Set &  rhs 
)
static

Check whether two sets intersect.

Template Parameters
Set
Parameters
lhsFirst set container
rhsSecond set container
Returns
true if two sets interesect false otherwise

◆ product()

template<typename TIterator >
auto InferenceEngine::details::product ( TIterator  beg,
TIterator  en 
) -> typename std::remove_reference<decltype(*beg)>::type

Multiplies container.

Parameters
[in]begThe begin iterator
[in]enThe end iterator
Template Parameters
TIteratorAn iterator type
Returns
A result of multiplication.