Various utility functions to work on Lists. More...
Classes | |
struct | appendEqOp |
struct | greater |
struct | less |
struct | unionEqOp |
struct | uniqueEqOp |
Functions | |
void | identity (labelUList &map, label start=0) |
template<class ListType , class UnaryPredicate > | |
label | find (const ListType &input, const UnaryPredicate &pred, const label start=0) |
template<class ListType , class UnaryPredicate > | |
bool | found (const ListType &input, const UnaryPredicate &pred, const label start=0) |
template<class ListType , class UnaryPredicate > | |
labelList | findIndices (const ListType &input, const UnaryPredicate &pred, label start=0) |
template<class T > | |
void | setValue (UList< T > &list, const labelUList &locations, const T &val) |
template<class T > | |
void | setValue (UList< T > &list, const labelHashSet &locations, const T &val) |
template<class T > | |
void | setValue (UList< T > &list, const UList< bool > &locations, const T &val) |
template<class T > | |
void | setValue (UList< T > &list, const bitSet &locations, const T &val) |
template<class T , class T2 , class UnaryOperation > | |
List< T > | create (const UList< T2 > &input, const UnaryOperation &op) |
template<class T , class InputIterator , class UnaryOperation > | |
List< T > | create (InputIterator first, InputIterator last, const UnaryOperation &op) |
template<class T > | |
List< T > | createWithValue (const label len, const labelUList &locations, const T &val, const T &deflt=T()) |
template<class T > | |
List< T > | createWithValue (const label len, const labelHashSet &locations, const T &val, const T &deflt=T()) |
template<class T > | |
List< T > | createWithValue (const label len, const UList< bool > &locations, const T &val, const T &deflt=T()) |
template<class T > | |
List< T > | createWithValue (const label len, const bitSet &locations, const T &val, const T &deflt=T()) |
template<class T > | |
List< T > | createWithValue (const label len, const label index, const T &val, const T &deflt=T()) |
template<class T > | |
List< T > | createWithValue (const label len, const label index, T &&val, const T &deflt=T()) |
void identity | ( | labelUList & | map, |
label | start = 0 |
||
) |
Definition at line 196 of file ListOps.C.
References UList::begin(), and UList::end().
Referenced by SortableList::partialReverseSort(), SortableList::partialSort(), SortList< T >::reset(), SortList< T >::reverseSort(), and SortList< T >::sort().
label Foam::ListOps::find | ( | const ListType & | input, |
const UnaryPredicate & | pred, | ||
const label | start = 0 |
||
) |
Referenced by distribution::add(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::at(), IOstreamOption::compressionEnum(), face::edgeDirection(), HashPtrTable< exprResult >::erase(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase(), objectRegistry::erase(), IndirectListBase< T, Addr >::found(), scalars::found(), FixedList< Type, 3 >::found(), UList< Foam::wordRe >::found(), found(), Enum< actionType >::get(), isoSurfaceParams::getFilterType(), Enum< actionType >::getOrDefault(), string::hasPath(), Enum< actionType >::lookup(), HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::operator()(), Enum< actionType >::read(), Enum< actionType >::readEntry(), HashPtrTable< exprResult >::release(), HashPtrTable< exprResult >::remove(), string::removeRepeated(), string::replace(), string::replaceAll(), regExpPosix::search(), cellTable::setName(), simpleObjectRegistry::setNamedValue(), simpleObjectRegistry::setValues(), exprString::valid(), face::which(), and Enum< actionType >::write().
bool found | ( | const ListType & | input, |
const UnaryPredicate & | pred, | ||
const label | start = 0 |
||
) |
Definition at line 1149 of file ListOpsTemplates.C.
References find(), and Foam::input().
Referenced by starcdWriter::write(), writeObjects::write(), and starcdWriter::writeTemplate().
labelList Foam::ListOps::findIndices | ( | const ListType & | input, |
const UnaryPredicate & | pred, | ||
label | start = 0 |
||
) |
void setValue | ( | UList< T > & | list, |
const labelUList & | locations, | ||
const T & | val | ||
) |
Definition at line 1210 of file ListOpsTemplates.C.
References UList::size().
void setValue | ( | UList< T > & | list, |
const labelHashSet & | locations, | ||
const T & | val | ||
) |
Definition at line 1231 of file ListOpsTemplates.C.
References UList::size().
Definition at line 1252 of file ListOpsTemplates.C.
References Foam::BitOps::count(), stdFoam::end(), Foam::min(), and UList::size().
Definition at line 1275 of file ListOpsTemplates.C.
References bitSet::find_first(), bitSet::find_next(), Foam::pos(), and UList::size().
List<T> Foam::ListOps::create | ( | InputIterator | first, |
InputIterator | last, | ||
const UnaryOperation & | op | ||
) |
List<T> Foam::ListOps::createWithValue | ( | const label | len, |
const labelUList & | locations, | ||
const T & | val, | ||
const T & | deflt = T() |
||
) |
List<T> Foam::ListOps::createWithValue | ( | const label | len, |
const labelHashSet & | locations, | ||
const T & | val, | ||
const T & | deflt = T() |
||
) |
List<T> Foam::ListOps::createWithValue | ( | const label | len, |
const UList< bool > & | locations, | ||
const T & | val, | ||
const T & | deflt = T() |
||
) |
List<T> Foam::ListOps::createWithValue | ( | const label | len, |
const bitSet & | locations, | ||
const T & | val, | ||
const T & | deflt = T() |
||
) |
List<T> Foam::ListOps::createWithValue | ( | const label | len, |
const label | index, | ||
const T & | val, | ||
const T & | deflt = T() |
||
) |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.