MeshLib
 
Loading...
Searching...
No Matches
Basic elements overview

This chapter represents documentation about basic elements. More...

Topics

 Iterators
 simple alternative to boost/iterator_range
 

Namespaces

namespace  MR::BitSetParallel
 

Classes

class  MR::BitSet
 container of bits More...
 
class  MR::TaggedBitSet< T >
 container of bits representing specific indices (faces, verts or edges) More...
 
class  MR::SetBitIteratorT< T >
 iterator to enumerate all indices with set bits in BitSet class or its derivatives More...
 
struct  MR::IdRange< Id >
 range of indices [beg, end) More...
 
class  MR::Buffer< V, I >
 std::vector<V>-like container that is 1) resized without initialization of its elements, 2) much simplified: no push_back and many other methods More...
 
class  MR::Heap< T, I, P >
 stores map from element id in[0, size) to T; More...
 
class  MR::Logger
 Make default spd logger. More...
 
class  MR::LoggingStreambuf
 A custom streambuf that outputs things directly to the default spdlog logger. More...
 
class  MR::RestoringStreamsSink
 
class  MR::Timer
 
struct  MR::SimpleTimeRecord
 
struct  MR::TimeRecord
 
struct  MR::ThreadRootTimeRecord
 
class  MR::UnionFind< I >
 Simple union find data structure. More...
 
class  MR::Vector< T, I >
 std::vector<T>-like container that requires specific indexing type, More...
 

Functions

MRMESH_API bool MR::operator== (const BitSet &a, const BitSet &b)
 compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off)
 
template<typename T >
bool MR::operator== (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T , typename U >
void MR::operator== (const TaggedBitSet< T > &a, const TaggedBitSet< U > &b)=delete
 prohibit comparison of unrelated sets
 
template<typename T >
std::function< bool(Id< T >)> MR::makePredicate (const TaggedBitSet< T > *bitset)
 
template<typename T >
std::function< bool(Id< T >)> MR::makePredicate (const TaggedBitSet< T > &bitset)
 
template<typename T >
bool MR::contains (const TaggedBitSet< T > *bitset, Id< T > id)
 
template<typename T >
bool MR::contains (const TaggedBitSet< T > &bitset, Id< T > id)
 
template<typename T >
bool MR::operator== (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
template<typename T >
bool MR::operator!= (const SetBitIteratorT< T > &a, const SetBitIteratorT< T > &b)
 
auto MR::begin (const BitSet &a)
 
auto MR::end (const BitSet &)
 
template<typename T >
auto MR::begin (const TaggedBitSet< T > &a)
 
template<typename T >
auto MR::end (const TaggedBitSet< T > &)
 
template<typename T >
Vector< int, Id< T > > MR::makeVectorWithSeqNums (const TaggedBitSet< T > &bs)
 creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits
 
template<typename T >
HashMap< Id< T >, int > MR::makeHashMapWithSeqNums (const TaggedBitSet< T > &bs)
 creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned
 
BitSet MR::operator& (const BitSet &a, const BitSet &b)
 
BitSet MR::operator| (const BitSet &a, const BitSet &b)
 
BitSet MR::operator^ (const BitSet &a, const BitSet &b)
 
BitSet MR::operator- (const BitSet &a, const BitSet &b)
 
template<typename T >
TaggedBitSet< T > MR::operator& (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > MR::operator| (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > MR::operator^ (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename T >
TaggedBitSet< T > MR::operator- (const TaggedBitSet< T > &a, const TaggedBitSet< T > &b)
 
template<typename BS , typename ... F>
auto MR::BitSetParallelForAllRanged (const BS &bs, F &&... f)
 
template<typename BS , typename L , typename ... F>
auto MR::BitSetParallelForAllRanged (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&... f)
 
template<typename BS , typename F , typename ... Cb>
auto MR::BitSetParallelForAll (const BS &bs, F &&f, Cb &&... cb)
 
template<typename BS , typename L , typename F , typename ... Cb>
auto MR::BitSetParallelForAll (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb)
 
template<typename BS , typename F , typename ... Cb>
auto MR::BitSetParallelFor (const BS &bs, F &&f, Cb &&... cb)
 
template<typename BS , typename L , typename F , typename ... Cb>
auto MR::BitSetParallelFor (const BS &bs, tbb::enumerable_thread_specific< L > &e, F &&f, Cb &&... cb)
 
template<typename T >
size_t MR::heapBytes (const std::vector< T > &vec)
 returns the amount of memory given vector occupies on heap
 
template<typename T , typename U >
size_t MR::heapBytes (const Vector< T, U > &vec)
 
template<typename T >
size_t MR::heapBytes (const std::unique_ptr< T > &ptr)
 returns the amount of memory this smart pointer and its pointed object own together on heap
 
template<typename T >
size_t MR::heapBytes (const std::shared_ptr< T > &ptr)
 returns the amount of memory this smart pointer and its pointed object own together on heap
 
template<typename T >
size_t MR::heapBytes (const std::function< T > &)
 Needed for generic code, always returns zero.
 
template<typename I , typename ... F>
auto MR::ParallelFor (I begin, I end, F &&... f)
 
template<typename I , typename L , typename ... F>
auto MR::ParallelFor (I begin, I end, tbb::enumerable_thread_specific< L > &e, F &&... f)
 
template<typename T , typename ... F>
auto MR::ParallelFor (const std::vector< T > &v, F &&... f)
 
template<typename T , typename I , typename ... F>
auto MR::ParallelFor (const Vector< T, I > &v, F &&... f)
 
template<typename T >
std::pair< T, T > MR::parallelMinMax (const std::vector< T > &vec, const T *topExcluding=nullptr)
 
template<typename T , typename I >
auto MR::parallelMinMaxArg (const Vector< T, I > &vec, const T *topExcluding=nullptr)
 
MRMESH_API void MR::vertMapsComposition (VertMap &a2b, const VertMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API VertMap MR::vertMapsComposition (const VertMap &a2b, const VertMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API void MR::edgeMapsComposition (EdgeMap &a2b, const EdgeMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API EdgeMap MR::edgeMapsComposition (const EdgeMap &a2b, const EdgeMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API void MR::faceMapsComposition (FaceMap &a2b, const FaceMap &b2c)
 updates a2b map to a2c map using b2c map
 
MRMESH_API FaceMap MR::faceMapsComposition (const FaceMap &a2b, const FaceMap &b2c)
 returns map a2c from a2b and b2c maps
 
MRMESH_API void MR::redirectSTDStreamsToLogger ()
 
MRMESH_API size_t MR::findSubstringCaseInsensitive (const std::string &string, const std::string &substring)
 
MRMESH_API int MR::calcDamerauLevenshteinDistance (const std::string &stringA, const std::string &stringB, bool caseSensitive=true)
 
MRMESH_API std::vector< std::string > MR::split (const std::string &string, const std::string &delimiter)
 
MRMESH_API std::wstring MR::utf8ToWide (const char *utf8)
 converts UTF8-encoded string into UTF16-encoded string
 
MRMESH_API std::string MR::systemToUtf8 (const std::string &system)
 converts system encoded string to UTF8-encoded string
 
MRMESH_API std::string MR::utf8ToSystem (const std::string &utf8)
 
MRMESH_API std::string MR::wideToUtf8 (const wchar_t *wide)
 converts wide null terminating string to UTF8-encoded string
 
const std::string & MR::asString (const std::string &s)
 
const std::string & MR::asU8String (const std::string &s)
 
std::string MR::asString (std::string &&s)
 
std::string MR::asU8String (std::string &&s)
 
std::filesystem::path MR::pathFromUtf8 (const std::string &s)
 
std::filesystem::path MR::pathFromUtf8 (const char *s)
 
std::string MR::utf8string (const std::filesystem::path &path)
 returns filename as UTF8-encoded string
 
MRMESH_API void MR::printTimingTreeAtEnd (bool on, double minTimeSec=0.1)
 
MRMESH_API void MR::printCurrentTimerBranch ()
 prints current timer branch
 
MRMESH_API void MR::printTimingTreeAndStop (double minTimeSec=0.1)
 
MRMESH_API void MR::registerThreadRootTimeRecord (ThreadRootTimeRecord &root)
 installs given record in the current thread (no record must be installed before)
 
MRMESH_API void MR::unregisterThreadRootTimeRecord (ThreadRootTimeRecord &root)
 un-installs given record in the current thread
 
template<typename M >
TaggedBitSet< T > MR::TaggedBitSet< T >::getMapping (const M &map) const
 
template<typename M >
TaggedBitSet< T > MR::TaggedBitSet< T >::getMapping (const M &map, size_t resSize) const
 
 MR::Heap< T, I, P >::Heap (size_t size, T def={}, P pred={})
 constructs heap for given number of elements, assigning given default value to each element
 
 MR::Heap< T, I, P >::Heap (std::vector< Element > elms, P pred={})
 constructs heap from given elements (id's shall not repeat and have spaces, but can be arbitrary shuffled)
 
void MR::Heap< T, I, P >::resize (size_t size, T def={})
 increases the size of the heap by adding elements at the end
 
void MR::Heap< T, I, P >::setValue (I elemId, const T &newVal)
 sets new value to given element
 
void MR::Heap< T, I, P >::setLargerValue (I elemId, const T &newVal)
 sets new value to given element, which shall be larger/smaller than the current value
 
void MR::Heap< T, I, P >::setSmallerValue (I elemId, const T &newVal)
 

Detailed Description

This chapter represents documentation about basic elements.

Function Documentation

◆ asString() [1/2]

const std::string & MR::asString ( const std::string & s)
inline

◆ asString() [2/2]

std::string MR::asString ( std::string && s)
inline

◆ asU8String() [1/2]

const std::string & MR::asU8String ( const std::string & s)
inline

◆ asU8String() [2/2]

std::string MR::asU8String ( std::string && s)
inline

◆ begin() [1/2]

auto MR::begin ( const BitSet & a)
inlinenodiscard

◆ begin() [2/2]

template<typename T >
auto MR::begin ( const TaggedBitSet< T > & a)
inlinenodiscard

◆ BitSetParallelFor() [1/2]

template<typename BS , typename F , typename ... Cb>
auto MR::BitSetParallelFor ( const BS & bs,
F && f,
Cb &&... cb )
inline

executes given function f for every set bit in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ BitSetParallelFor() [2/2]

template<typename BS , typename L , typename F , typename ... Cb>
auto MR::BitSetParallelFor ( const BS & bs,
tbb::enumerable_thread_specific< L > & e,
F && f,
Cb &&... cb )
inline

executes given function f for every set bit in bs IdRange or BitSet (bs) parallel threads, passing e.local() (evaluated once for each sub-range) as the second argument to f; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ BitSetParallelForAll() [1/2]

template<typename BS , typename F , typename ... Cb>
auto MR::BitSetParallelForAll ( const BS & bs,
F && f,
Cb &&... cb )
inline

executes given function f for each index in IdRange or BitSet (bs) in parallel threads; it is guaranteed that every individual block in BitSet is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ BitSetParallelForAll() [2/2]

template<typename BS , typename L , typename F , typename ... Cb>
auto MR::BitSetParallelForAll ( const BS & bs,
tbb::enumerable_thread_specific< L > & e,
F && f,
Cb &&... cb )
inline

executes given function f for each index in IdRange or BitSet (bs) in parallel threads passing e.local() (evaluated once for each sub-range) as the second argument to f; it is guaranteed that every individual block in BitSet is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ BitSetParallelForAllRanged() [1/2]

template<typename BS , typename ... F>
auto MR::BitSetParallelForAllRanged ( const BS & bs,
F &&... f )
inline

executes given function f( bit, subBitRange ) for each bit in bitRange in parallel threads, where (subBitRange) are the bits that will be processed by the same thread; it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ BitSetParallelForAllRanged() [2/2]

template<typename BS , typename L , typename ... F>
auto MR::BitSetParallelForAllRanged ( const BS & bs,
tbb::enumerable_thread_specific< L > & e,
F &&... f )
inline

executes given function f( bit, subBitRange, tls ) for each bit in IdRange or BitSet (bs) in parallel threads, where subBitRange are the bits that will be processed by the same thread, tls=e.local() (evaluated once for each subBitRange); it is guaranteed that every individual block in bit-set is processed by one thread only; optional parameters after f: ProgressCallback cb, size_t reportProgressEveryBit = 1024 for periodic progress report

Returns
false if terminated by callback

◆ calcDamerauLevenshteinDistance()

MRMESH_API int MR::calcDamerauLevenshteinDistance ( const std::string & stringA,
const std::string & stringB,
bool caseSensitive = true )
nodiscard

Calculates Damerau-Levenshtein distance between to strings

◆ contains() [1/2]

template<typename T >
bool MR::contains ( const TaggedBitSet< T > & bitset,
Id< T > id )
inlinenodiscard

◆ contains() [2/2]

template<typename T >
bool MR::contains ( const TaggedBitSet< T > * bitset,
Id< T > id )
inlinenodiscard

◆ edgeMapsComposition() [1/2]

MRMESH_API EdgeMap MR::edgeMapsComposition ( const EdgeMap & a2b,
const EdgeMap & b2c )
nodiscard

returns map a2c from a2b and b2c maps

◆ edgeMapsComposition() [2/2]

MRMESH_API void MR::edgeMapsComposition ( EdgeMap & a2b,
const EdgeMap & b2c )

updates a2b map to a2c map using b2c map

◆ end() [1/2]

auto MR::end ( const BitSet & )
inlinenodiscard

◆ end() [2/2]

template<typename T >
auto MR::end ( const TaggedBitSet< T > & )
inlinenodiscard

◆ faceMapsComposition() [1/2]

MRMESH_API FaceMap MR::faceMapsComposition ( const FaceMap & a2b,
const FaceMap & b2c )
nodiscard

returns map a2c from a2b and b2c maps

◆ faceMapsComposition() [2/2]

MRMESH_API void MR::faceMapsComposition ( FaceMap & a2b,
const FaceMap & b2c )

updates a2b map to a2c map using b2c map

◆ findSubstringCaseInsensitive()

MRMESH_API size_t MR::findSubstringCaseInsensitive ( const std::string & string,
const std::string & substring )
nodiscard

Finds the substring in the string.

Returns
position, npos if not found

◆ getMapping() [1/2]

template<typename T >
template<typename M >
TaggedBitSet< T > MR::TaggedBitSet< T >::getMapping ( const M & map) const
nodiscard

◆ getMapping() [2/2]

template<typename T >
template<typename M >
TaggedBitSet< T > MR::TaggedBitSet< T >::getMapping ( const M & map,
size_t resSize ) const
nodiscard

◆ Heap() [1/2]

template<typename T , typename I , typename P >
MR::Heap< T, I, P >::Heap ( size_t size,
T def = {},
P pred = {} )
explicit

constructs heap for given number of elements, assigning given default value to each element

◆ Heap() [2/2]

template<typename T , typename I , typename P >
MR::Heap< T, I, P >::Heap ( std::vector< Element > elms,
P pred = {} )
explicit

constructs heap from given elements (id's shall not repeat and have spaces, but can be arbitrary shuffled)

◆ heapBytes() [1/5]

template<typename T >
size_t MR::heapBytes ( const std::function< T > & )
inlinenodiscard

Needed for generic code, always returns zero.

◆ heapBytes() [2/5]

template<typename T >
size_t MR::heapBytes ( const std::shared_ptr< T > & ptr)
inlinenodiscard

returns the amount of memory this smart pointer and its pointed object own together on heap

◆ heapBytes() [3/5]

template<typename T >
size_t MR::heapBytes ( const std::unique_ptr< T > & ptr)
inlinenodiscard

returns the amount of memory this smart pointer and its pointed object own together on heap

◆ heapBytes() [4/5]

template<typename T >
size_t MR::heapBytes ( const std::vector< T > & vec)
inlinenodiscard

returns the amount of memory given vector occupies on heap

◆ heapBytes() [5/5]

template<typename T , typename U >
size_t MR::heapBytes ( const Vector< T, U > & vec)
inlinenodiscard

◆ makeHashMapWithSeqNums()

template<typename T >
HashMap< Id< T >, int > MR::makeHashMapWithSeqNums ( const TaggedBitSet< T > & bs)
nodiscard

creates a HashMap where for each set bit of input bitset its sequential number starting from 0 is returned

◆ makePredicate() [1/2]

template<typename T >
std::function< bool(Id< T >)> MR::makePredicate ( const TaggedBitSet< T > & bitset)
inlinenodiscard

◆ makePredicate() [2/2]

template<typename T >
std::function< bool(Id< T >)> MR::makePredicate ( const TaggedBitSet< T > * bitset)
inlinenodiscard

◆ makeVectorWithSeqNums()

template<typename T >
Vector< int, Id< T > > MR::makeVectorWithSeqNums ( const TaggedBitSet< T > & bs)
nodiscard

creates a Vector where for each set bit of input bitset its sequential number starting from 0 is returned; and -1 for reset bits

◆ operator!=()

template<typename T >
bool MR::operator!= ( const SetBitIteratorT< T > & a,
const SetBitIteratorT< T > & b )
inlinenodiscard

◆ operator&() [1/2]

BitSet MR::operator& ( const BitSet & a,
const BitSet & b )
inlinenodiscard

◆ operator&() [2/2]

template<typename T >
TaggedBitSet< T > MR::operator& ( const TaggedBitSet< T > & a,
const TaggedBitSet< T > & b )
inlinenodiscard

◆ operator-() [1/2]

BitSet MR::operator- ( const BitSet & a,
const BitSet & b )
inlinenodiscard

◆ operator-() [2/2]

template<typename T >
TaggedBitSet< T > MR::operator- ( const TaggedBitSet< T > & a,
const TaggedBitSet< T > & b )
inlinenodiscard

◆ operator==() [1/4]

MRMESH_API bool MR::operator== ( const BitSet & a,
const BitSet & b )
nodiscard

compare that two bit sets have the same set bits (they can be equal even if sizes are distinct but last bits are off)

◆ operator==() [2/4]

template<typename T >
bool MR::operator== ( const SetBitIteratorT< T > & a,
const SetBitIteratorT< T > & b )
inlinenodiscard

◆ operator==() [3/4]

template<typename T >
bool MR::operator== ( const TaggedBitSet< T > & a,
const TaggedBitSet< T > & b )
inlinenodiscard

◆ operator==() [4/4]

template<typename T , typename U >
void MR::operator== ( const TaggedBitSet< T > & a,
const TaggedBitSet< U > & b )
delete

prohibit comparison of unrelated sets

◆ operator^() [1/2]

BitSet MR::operator^ ( const BitSet & a,
const BitSet & b )
inlinenodiscard

◆ operator^() [2/2]

template<typename T >
TaggedBitSet< T > MR::operator^ ( const TaggedBitSet< T > & a,
const TaggedBitSet< T > & b )
inlinenodiscard

◆ operator|() [1/2]

BitSet MR::operator| ( const BitSet & a,
const BitSet & b )
inlinenodiscard

◆ operator|() [2/2]

template<typename T >
TaggedBitSet< T > MR::operator| ( const TaggedBitSet< T > & a,
const TaggedBitSet< T > & b )
inlinenodiscard

◆ ParallelFor() [1/4]

template<typename T , typename ... F>
auto MR::ParallelFor ( const std::vector< T > & v,
F &&... f )
inline

executes given function f for each vector element in parallel threads; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report

Returns
false if terminated by callback

◆ ParallelFor() [2/4]

template<typename T , typename I , typename ... F>
auto MR::ParallelFor ( const Vector< T, I > & v,
F &&... f )
inline

executes given function f for each vector element in parallel threads; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report

Returns
false if terminated by callback

◆ ParallelFor() [3/4]

template<typename I , typename ... F>
auto MR::ParallelFor ( I begin,
I end,
F &&... f )
inline

executes given function f for each span element [begin, end); optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report

Returns
false if terminated by callback

◆ ParallelFor() [4/4]

template<typename I , typename L , typename ... F>
auto MR::ParallelFor ( I begin,
I end,
tbb::enumerable_thread_specific< L > & e,
F &&... f )
inline

executes given function f for each span element [begin, end) passing e.local() (evaluated once for each sub-range) as the second argument to f; optional parameters after f: ProgressCallback cb, size_t reportProgressEvery = 1024 for periodic progress report

Returns
false if terminated by callback

◆ parallelMinMax()

template<typename T >
std::pair< T, T > MR::parallelMinMax ( const std::vector< T > & vec,
const T * topExcluding = nullptr )

finds minimal and maximal elements in given vector in parallel;

Parameters
topExcludingif provided then all values in the array equal or larger by absolute value than it will be ignored

◆ parallelMinMaxArg()

template<typename T , typename I >
auto MR::parallelMinMaxArg ( const Vector< T, I > & vec,
const T * topExcluding = nullptr )

finds minimal and maximal elements and their indices in given vector in parallel;

Parameters
topExcludingif provided then all values in the array equal or larger by absolute value than it will be ignored

◆ pathFromUtf8() [1/2]

std::filesystem::path MR::pathFromUtf8 ( const char * s)
inline

◆ pathFromUtf8() [2/2]

std::filesystem::path MR::pathFromUtf8 ( const std::string & s)
inline

◆ printCurrentTimerBranch()

MRMESH_API void MR::printCurrentTimerBranch ( )

prints current timer branch

◆ printTimingTreeAndStop()

MRMESH_API void MR::printTimingTreeAndStop ( double minTimeSec = 0.1)

prints the current timing tree, then calls printTimingTreeAtEnd( false );

Parameters
minTimeSecomit printing records with time spent less than given value in seconds

◆ printTimingTreeAtEnd()

MRMESH_API void MR::printTimingTreeAtEnd ( bool on,
double minTimeSec = 0.1 )

enables or disables printing of timing tree when application terminates

Parameters
minTimeSecomit printing records with time spent less than given value in seconds

◆ redirectSTDStreamsToLogger()

MRMESH_API void MR::redirectSTDStreamsToLogger ( )

Redirects stdcout stdcerr stdclog to default logger

Note
do not call this function directly if you use MR::setupLoggerByDefault()

◆ registerThreadRootTimeRecord()

MRMESH_API void MR::registerThreadRootTimeRecord ( ThreadRootTimeRecord & root)

installs given record in the current thread (no record must be installed before)

◆ resize()

template<typename T , typename I , typename P >
void MR::Heap< T, I, P >::resize ( size_t size,
T def = {} )

increases the size of the heap by adding elements at the end

◆ setLargerValue()

template<typename T , typename I , typename P >
void MR::Heap< T, I, P >::setLargerValue ( I elemId,
const T & newVal )

sets new value to given element, which shall be larger/smaller than the current value

◆ setSmallerValue()

template<typename T , typename I , typename P >
void MR::Heap< T, I, P >::setSmallerValue ( I elemId,
const T & newVal )

◆ setValue()

template<typename T , typename I , typename P >
void MR::Heap< T, I, P >::setValue ( I elemId,
const T & newVal )

sets new value to given element

◆ split()

MRMESH_API std::vector< std::string > MR::split ( const std::string & string,
const std::string & delimiter )
nodiscard

Splits given string by delimiter.

Returns
vector of split strings

◆ systemToUtf8()

MRMESH_API std::string MR::systemToUtf8 ( const std::string & system)

converts system encoded string to UTF8-encoded string

◆ unregisterThreadRootTimeRecord()

MRMESH_API void MR::unregisterThreadRootTimeRecord ( ThreadRootTimeRecord & root)

un-installs given record in the current thread

◆ utf8string()

std::string MR::utf8string ( const std::filesystem::path & path)
inline

returns filename as UTF8-encoded string

◆ utf8ToSystem()

MRMESH_API std::string MR::utf8ToSystem ( const std::string & utf8)

converts UTF8-encoded string to system encoded string, returns empty string if such conversion cannot be made

◆ utf8ToWide()

MRMESH_API std::wstring MR::utf8ToWide ( const char * utf8)

converts UTF8-encoded string into UTF16-encoded string

◆ vertMapsComposition() [1/2]

MRMESH_API VertMap MR::vertMapsComposition ( const VertMap & a2b,
const VertMap & b2c )
nodiscard

returns map a2c from a2b and b2c maps

◆ vertMapsComposition() [2/2]

MRMESH_API void MR::vertMapsComposition ( VertMap & a2b,
const VertMap & b2c )

updates a2b map to a2c map using b2c map

◆ wideToUtf8()

MRMESH_API std::string MR::wideToUtf8 ( const wchar_t * wide)

converts wide null terminating string to UTF8-encoded string