Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ISM::Tree Class Reference

#include <Tree.hpp>

Public Member Functions

void addChild (const boost::shared_ptr< Tree > &child)
 
void addVotes (const std::string &voterType, const std::vector< VoteSpecifierPtr > &votes)
 
unsigned getHeight ()
 
IsmPtr getISM ()
 
TrackPtr getReference ()
 
std::vector< VoteSpecifierPtrgetVotesByType (const std::string &type)
 
unsigned getWeight ()
 
void setHeight (unsigned height)
 
void setISM (IsmPtr ism)
 
void setWeight (unsigned weight)
 
 Tree (TrackPtr reference)
 
 Tree (const std::string &pattern, ObjectRelations topology, bool naive=false)
 

Private Member Functions

void build (std::string pattern, unsigned clusterId, const TrackPtr reference, std::vector< ClusterPtr > &clustersLeft, const std::vector< ClusterPtr > &allClusters, IsmPtr &ism, bool naive)
 
std::vector< ClusterPtrbuildClusters (ISM::ObjectRelations) const
 
std::vector< VoteSpecifierPtrgenerateISM (ISM::ObjectRelations)
 
TreePtr generateTree (const std::string &pattern, const TrackPtr &reference, std::vector< ClusterPtr > clusters, bool naive=false)
 
std::pair< std::map< ISM::TrackPtr, int >, std::vector< std::pair< int, ISM::TrackPtr > > > getMostCommonObjects (const ISM::ObjectRelations &topology) const
 
std::pair< TrackPtr, ClusterPtrgetReference (std::vector< std::pair< int, TrackPtr > > &objectTracks, const std::vector< ClusterPtr > &currentClusters, const ObjectRelations &topology) const
 
 Tree (std::string pattern, unsigned clusterId, const TrackPtr reference, std::vector< ClusterPtr > &clustersLeft, const std::vector< ClusterPtr > &allClusters, IsmPtr &ism, bool naive)
 

Static Private Member Functions

static bool compareClusters (const ClusterPtr &one, const ClusterPtr &two)
 
template<typename T >
static bool pairCompare (const std::pair< unsigned, T > &firstElem, const std::pair< unsigned, T > &secondElem)
 

Private Attributes

std::vector< boost::shared_ptr< Tree > > children
 
unsigned height
 
IsmPtr ism
 
const char * LOG_COLOR_CLUSTER = LogHelper::LOG_COLOR_MAGENTA
 
const char * LOG_COLOR_TREE = LogHelper::LOG_COLOR_GREEN
 
TrackPtr reference
 
std::map< std::string, std::vector< VoteSpecifierPtr > > votesByVotersType
 
unsigned weight
 

Detailed Description

Definition at line 32 of file Tree.hpp.

Constructor & Destructor Documentation

ISM::Tree::Tree ( TrackPtr  reference)
inline

Definition at line 35 of file Tree.hpp.

ISM::Tree::Tree ( const std::string &  pattern,
ObjectRelations  topology,
bool  naive = false 
)

Definition at line 32 of file Tree.cpp.

ISM::Tree::Tree ( std::string  pattern,
unsigned  clusterId,
const TrackPtr  reference,
std::vector< ClusterPtr > &  clustersLeft,
const std::vector< ClusterPtr > &  allClusters,
IsmPtr ism,
bool  naive 
)
private

Definition at line 25 of file Tree.cpp.

Member Function Documentation

void ISM::Tree::addChild ( const boost::shared_ptr< Tree > &  child)

Definition at line 352 of file Tree.cpp.

void ISM::Tree::addVotes ( const std::string &  voterType,
const std::vector< VoteSpecifierPtr > &  votes 
)

Definition at line 377 of file Tree.cpp.

void ISM::Tree::build ( std::string  pattern,
unsigned  clusterId,
const TrackPtr  reference,
std::vector< ClusterPtr > &  clustersLeft,
const std::vector< ClusterPtr > &  allClusters,
IsmPtr ism,
bool  naive 
)
private

Definition at line 71 of file Tree.cpp.

std::vector< ClusterPtr > ISM::Tree::buildClusters ( ISM::ObjectRelations  topology) const
private

Definition at line 181 of file Tree.cpp.

bool ISM::Tree::compareClusters ( const ClusterPtr one,
const ClusterPtr two 
)
staticprivate

Definition at line 341 of file Tree.cpp.

std::vector<VoteSpecifierPtr> ISM::Tree::generateISM ( ISM::ObjectRelations  )
private
TreePtr ISM::Tree::generateTree ( const std::string &  pattern,
const TrackPtr reference,
std::vector< ClusterPtr clusters,
bool  naive = false 
)
private
unsigned ISM::Tree::getHeight ( )

Definition at line 362 of file Tree.cpp.

IsmPtr ISM::Tree::getISM ( )

Definition at line 393 of file Tree.cpp.

std::pair< std::map< ISM::TrackPtr, int >, std::vector< std::pair< int, ISM::TrackPtr > > > ISM::Tree::getMostCommonObjects ( const ISM::ObjectRelations topology) const
private

Definition at line 242 of file Tree.cpp.

TrackPtr ISM::Tree::getReference ( )

Definition at line 388 of file Tree.cpp.

std::pair< TrackPtr, ClusterPtr > ISM::Tree::getReference ( std::vector< std::pair< int, TrackPtr > > &  objectTracks,
const std::vector< ClusterPtr > &  currentClusters,
const ObjectRelations topology 
) const
private

Definition at line 292 of file Tree.cpp.

std::vector< VoteSpecifierPtr > ISM::Tree::getVotesByType ( const std::string &  type)

Definition at line 383 of file Tree.cpp.

unsigned ISM::Tree::getWeight ( )

Definition at line 372 of file Tree.cpp.

template<typename T >
bool ISM::Tree::pairCompare ( const std::pair< unsigned, T > &  firstElem,
const std::pair< unsigned, T > &  secondElem 
)
staticprivate

Definition at line 346 of file Tree.cpp.

void ISM::Tree::setHeight ( unsigned  height)

Definition at line 357 of file Tree.cpp.

void ISM::Tree::setISM ( IsmPtr  ism)

Definition at line 398 of file Tree.cpp.

void ISM::Tree::setWeight ( unsigned  weight)

Definition at line 367 of file Tree.cpp.

Member Data Documentation

std::vector<boost::shared_ptr<Tree> > ISM::Tree::children
private

Definition at line 69 of file Tree.hpp.

unsigned ISM::Tree::height
private

Definition at line 70 of file Tree.hpp.

IsmPtr ISM::Tree::ism
private

Definition at line 73 of file Tree.hpp.

const char* ISM::Tree::LOG_COLOR_CLUSTER = LogHelper::LOG_COLOR_MAGENTA
private

Definition at line 66 of file Tree.hpp.

const char* ISM::Tree::LOG_COLOR_TREE = LogHelper::LOG_COLOR_GREEN
private

Definition at line 65 of file Tree.hpp.

TrackPtr ISM::Tree::reference
private

Definition at line 68 of file Tree.hpp.

std::map<std::string, std::vector<VoteSpecifierPtr> > ISM::Tree::votesByVotersType
private

Definition at line 72 of file Tree.hpp.

unsigned ISM::Tree::weight
private

Definition at line 71 of file Tree.hpp.


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


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41