Macaulay2 Engine
Loading...
Searching...
No Matches

◆ wordWeight()

int FreeMonoid::wordWeight ( Word & word,
const std::vector< int > & weight,
int start_index ) const
private

Definition at line 336 of file FreeMonoid.cpp.

337{
338 assert(start_index <= word.size());
339 int result = 0;
340 for (int j = start_index; j < word.size(); ++j)
341 result += weight[word.begin()[j]];
342 return result;
343}
std::vector< int > word
VALGRIND_MAKE_MEM_DEFINED & result(result)

References result(), and word.

Referenced by wordHeft(), and wordHeft().