OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Classes | Functions
endfieldmodel Namespace Reference

Classes

class  EndFieldModel
 
class  Enge
 
class  Tanh
 

Functions

bool GreaterThan (std::vector< int > v1, std::vector< int > v2)
 CompactVector helper function, used for sorting. More...
 
std::vector< std::vector< int > > CompactVector (std::vector< std::vector< int > > vec)
 
template<class TEMP_ITER >
bool IterableEquality (TEMP_ITER a_begin, TEMP_ITER a_end, TEMP_ITER b_begin, TEMP_ITER b_end)
 
template<class TEMP_CLASS >
bool IterableEquality (const TEMP_CLASS &a, const TEMP_CLASS &b)
 

Function Documentation

std::vector< std::vector< int > > endfieldmodel::CompactVector ( std::vector< std::vector< int > >  vec)

Definition at line 43 of file EndFieldModel.cpp.

References GreaterThan(), and IterableEquality().

Referenced by endfieldmodel::Enge::SetEngeDiffIndices(), and endfieldmodel::Tanh::setTanhDiffIndices().

Here is the call graph for this function:

bool endfieldmodel::GreaterThan ( std::vector< int >  v1,
std::vector< int >  v2 
)

CompactVector helper function, used for sorting.

Definition at line 34 of file EndFieldModel.cpp.

Referenced by CompactVector().

template<class TEMP_ITER >
bool endfieldmodel::IterableEquality ( TEMP_ITER  a_begin,
TEMP_ITER  a_end,
TEMP_ITER  b_begin,
TEMP_ITER  b_end 
)

Return a == b if a and b are same size and a[i] == b[i] for all i.

The following operations must be defined for TEMP_ITER it:

  • ++it prefix increment operator
  • (*it) (that is unary *, i.e. dereference operator)
  • it1 != it2 not equals operator
  • (*it1) != (*it2) not equals operator of dereferenced object

Call like e.g.
std::vector<int> a,b;
bool test_equal = IterableEquality(a.begin(), a.end(), b.begin(), b.end());
Can give a segmentation fault if a.begin() is not between a.begin() and a.end() (inclusive)

Definition at line 96 of file EndFieldModel.h.

Referenced by CompactVector(), and IterableEquality().

template<class TEMP_CLASS >
bool endfieldmodel::IterableEquality ( const TEMP_CLASS &  a,
const TEMP_CLASS &  b 
)

Definition at line 91 of file EndFieldModel.h.

References IterableEquality().

Here is the call graph for this function: