# PhasicFlow: src/phasicFlow/containers/Vector/VectorMath.hpp File Reference

VectorMath.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

| pFlow

## Macros

#define | VecFunc(fnName)
#define | VecFunc2(fnName)

## Functions

template<typename T , typename Allocator >
Vector< T, Allocator > | pow (const Vector< T, Allocator > &v, T e)
template<typename T , typename Allocator , typename indexFunc >
Vector< T, Allocator > | pow (const Vector< T, Allocator > &v, T e, indexFunc iFn)
template<typename T , typename Allocator >
T | min (const Vector< T, Allocator > &v)
template<typename T , typename Allocator , typename indexFunc >
T | min (const Vector< T, Allocator > &v, indexFunc iFn)
template<typename T , typename Allocator >
T | max (const Vector< T, Allocator > &v)
template<typename T , typename Allocator , typename indexFunc >
T | max (const Vector< T, Allocator > &v, indexFunc iFn)
template<typename T , typename Allocator >
T | sum (const Vector< T, Allocator > &v)
template<typename T , typename Allocator , typename indexFunc >
T | sum (const Vector< T, Allocator > &v, indexFunc iFn)

## Macro Definition Documentation

## VecFunc

#define VecFunc | ( |  | fnName | ) |

Value:
template<typename T, typename Allocator> \
inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T,Allocator>& v) \
{ \
Vector<T, Allocator> res(v.capacity(), Logical()); \
for(auto& e:v) \
{ \
res.push_back( fnName(e) ); \
} \
return std::move(res); \
} \
template<typename T, typename Allocator, typename indexFunc> \
inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v, indexFunc iFn) \
{ \
Vector<T, Allocator> res(v.capacity(), Logical()); \
for(label i=0; i<v.size(); i++) \
{ \
if( iFn(i) ) \
res.push_back(fnName(v[i])); \
else \
res.push_back(v[i]); \
} \
return std::move(res); \
}

Definition at line 22 of file VectorMath.hpp.

## VecFunc2

#define VecFunc2 | ( |  | fnName | ) |

Value:
template<typename T, typename Allocator> \
inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v1, const Vector<T, Allocator>& v2) \
{ \
Vector<T, Allocator> res(v1.capacity(), Logical()); \
for(label i=0; i<v1.size(); i++) \
{ \
res.push_back( fnName(v1[i], v2[i])); \
} \
return std::move(res); \
} \
template<typename T, typename Allocator, typename indexFunc> \
inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v1, const Vector<T, Allocator>& v2, indexFunc iFn) \
{ \
Vector<T, Allocator> res(v1.capacity(), Logical()); \
for(label i=0; i<v1.size(); i++) \
{ \
if( iFn(i) ) \
res.push_back(fnName(v1[i], v2[i])); \
else \
res.push_back(v1[i]); \
} \
return std::move(res); \
}

Definition at line 47 of file VectorMath.hpp.

pFlow::label
std::size_t label
Definition: builtinTypes.hpp:61
pFlow::Vector
Definition: Vector.hpp:46