Loading...
Searching...
No Matches
pappso::spectree::SpecXtractMap Class Reference

store all similarities in vectors an map : very costly for memory and CPU More...

`#include <specxtractinterface.h>`

Inheritance diagram for pappso::spectree::SpecXtractMap:

## Public Member Functions

| SpecXtractMap ()
virtual | ~SpecXtractMap ()
void | reportSimilarity (std::size_t cart_id_a, std::size_t cart_id_b, std::size_t similarity) override
const std::map< std::size_t, std::map< std::size_t, std::size_t > > & | getMapSimilarities () const
void | clear ()
Public Member Functions inherited from pappso::spectree::SpecXtractInterface
| SpecXtractInterface ()
virtual | ~SpecXtractInterface ()
virtual void | beginItemCartExtraction (std::size_t cart_id_a)
virtual void | endItemCartExtraction (std::size_t cart_id_a)

## Private Attributes

std::map< std::size_t, std::map< std::size_t, std::size_t > > | m_mapSimilarities

## Detailed Description

store all similarities in vectors an map : very costly for memory and CPU

only for testing purpose

Definition at line 77 of file specxtractinterface.h.

## Constructor & Destructor Documentation

## SpecXtractMap()

pappso::spectree::SpecXtractMap::SpecXtractMap | ( |  | ) |

Default constructor

Definition at line 82 of file specxtractinterface.cpp.

{
}

## ~SpecXtractMap()

pappso::spectree::SpecXtractMap::~SpecXtractMap | ( |  | ) |

virtual

Destructor

Definition at line 86 of file specxtractinterface.cpp.

{
}

## Member Function Documentation

## clear()

void pappso::spectree::SpecXtractMap::clear | ( |  | ) |

Definition at line 97 of file specxtractinterface.cpp.

{
m_mapSimilarities.clear();
}
pappso::spectree::SpecXtractMap::m_mapSimilarities
std::map< std::size_t, std::map< std::size_t, std::size_t > > m_mapSimilarities
Definition specxtractinterface.h:101

References m_mapSimilarities.

## getMapSimilarities()

const std::map< std::size_t, std::map< std::size_t, std::size_t > > & pappso::spectree::SpecXtractMap::getMapSimilarities | ( |  | ) | const

Definition at line 91 of file specxtractinterface.cpp.

{
return m_mapSimilarities;
}

References m_mapSimilarities.

## reportSimilarity()

void pappso::spectree::SpecXtractMap::reportSimilarity | ( | std::size_t | cart_id_a,
|  | std::size_t | cart_id_b,
|  | std::size_t | similarity
| ) |  |

override virtual

Implements pappso::spectree::SpecXtractInterface.

Definition at line 65 of file specxtractinterface.cpp.

{
qDebug() << " a=" << cart_id_a << " b=" << cart_id_b
<< " count=" << similarity;
auto it_line =
m_mapSimilarities.insert({cart_id_a, std::map<std::size_t, std::size_t>()});
auto it_line2 = it_line.first->second.insert({cart_id_b, similarity});
if(it_line2.second == false)
{
it_line2.first->second = similarity;
}
}

References m_mapSimilarities.

## Member Data Documentation

## m_mapSimilarities

std::map<std::size_t, std::map<std::size_t, std::size_t> > pappso::spectree::SpecXtractMap::m_mapSimilarities

private

Definition at line 101 of file specxtractinterface.h.

Referenced by clear(), getMapSimilarities(), and reportSimilarity().

The documentation for this class was generated from the following files:

- pappsomspp/processing/spectree/specxtractinterface.h
- pappsomspp/processing/spectree/specxtractinterface.cpp