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

container for spectree items More...

`#include <itemcart.h>`

## Public Member Functions

| ItemCart ()
| ItemCart (std::size_t id, const std::vector< std::size_t > &item_list)
| ItemCart (const ItemCart &other)
virtual | ~ItemCart ()
const std::vector< std::size_t > & | getItemList () const
std::size_t | getId () const
ItemCart & | operator= (const ItemCart &other)

## Protected Attributes

std::size_t | m_id
std::vector< std::size_t > | m_itemList

## Detailed Description

container for spectree items

ItemCart is the basic container to use SpecTree algorithm each cart has an id (long integer) and a list of items (list of integers)

SpecTree will be able to quickly count common items between every cart

Definition at line 54 of file itemcart.h.

## Constructor & Destructor Documentation

## ItemCart() [1/3]

pappso::spectree::ItemCart::ItemCart | ( |  | ) |

Default constructor

Definition at line 42 of file itemcart.cpp.

{
}

Referenced by ItemCart(), and operator=().

## ItemCart() [2/3]

pappso::spectree::ItemCart::ItemCart | ( | std::size_t | id,
|  | const std::vector< std::size_t > & | item_list )

Definition at line 46 of file itemcart.cpp.

: m_id(id), m_itemList(item_list)
{
}
pappso::spectree::ItemCart::m_itemList
std::vector< std::size_t > m_itemList
Definition itemcart.h:84
pappso::spectree::ItemCart::m_id
std::size_t m_id
Definition itemcart.h:83

References m_id, and m_itemList.

## ItemCart() [3/3]

pappso::spectree::ItemCart::ItemCart | ( | const ItemCart & | other | ) |

Copy constructor

Parameters

  other | TODO

Definition at line 52 of file itemcart.cpp.

{
m_id = other.m_id;
m_itemList = other.m_itemList;
}

References ItemCart(), m_id, and m_itemList.

## ~ItemCart()

pappso::spectree::ItemCart::~ItemCart | ( |  | ) |

virtual

Destructor

Definition at line 58 of file itemcart.cpp.

{
}

## Member Function Documentation

## getId()

std::size_t pappso::spectree::ItemCart::getId | ( |  | ) | const

Definition at line 63 of file itemcart.cpp.

{
return m_id;
}

References m_id.

Referenced by pappso::spectree::BucketClustering::addItemCart().

## getItemList()

const std::vector< std::size_t > & pappso::spectree::ItemCart::getItemList | ( |  | ) | const

Definition at line 77 of file itemcart.cpp.

{
return m_itemList;
}

References m_itemList.

Referenced by pappso::spectree::BucketClustering::addItemCart().

## operator=()

ItemCart & pappso::spectree::ItemCart::operator= | ( | const ItemCart & | other | ) |

Definition at line 69 of file itemcart.cpp.

{
m_id = other.m_id;
m_itemList = other.m_itemList;
return *this;
}

References ItemCart(), m_id, and m_itemList.

## Member Data Documentation

## m_id

std::size_t pappso::spectree::ItemCart::m_id

protected

Definition at line 83 of file itemcart.h.

Referenced by ItemCart(), ItemCart(), getId(), and operator=().

## m_itemList

std::vector<std::size_t> pappso::spectree::ItemCart::m_itemList

protected

Definition at line 84 of file itemcart.h.

Referenced by ItemCart(), ItemCart(), getItemList(), and operator=().

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

- pappsomspp/core/processing/spectree/itemcart.h
- pappsomspp/core/processing/spectree/itemcart.cpp