MCPcopy Create free account
hub / github.com/KDE/labplot / dictionaryIndex

Method dictionaryIndex

src/backend/core/column/ColumnPrivate.cpp:2857–2872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2855}
2856
2857int ColumnPrivate::dictionaryIndex(int row) const {
2858 if (!available.dictionary)
2859 const_cast<ColumnPrivate*>(this)->initDictionary();
2860
2861 const auto& value = textAt(row);
2862 int index = 0;
2863 auto it = m_dictionary.constBegin();
2864 while (it != m_dictionary.constEnd()) {
2865 if (*it == value)
2866 break;
2867 ++index;
2868 ++it;
2869 }
2870
2871 return index;
2872}
2873
2874const QMap<QString, int>& ColumnPrivate::frequencies() const {
2875 if (!available.dictionary)

Callers

nothing calls this directly

Calls 1

initDictionaryMethod · 0.80

Tested by

no test coverage detected