Belle II Software  release-08-01-10
WeightedRelation< AFrom, ATo > Class Template Reference

Type for two related objects with a weight. More...

#include <WeightedRelation.h>

Inheritance diagram for WeightedRelation< AFrom, ATo >:
Collaboration diagram for WeightedRelation< AFrom, ATo >:

Public Types

using From = AFrom
 Type of from which the relation originates.
 
using To = ATo
 Type of to which the relation points.
 

Public Member Functions

 WeightedRelation ()=default
 Default constructor.
 
 WeightedRelation (From *from, Weight weight, To *to)
 Creating a relation with one object on the from side, one on the to side and a weight.
 
bool operator< (const WeightedRelation< From, To > &rhs) const
 Operator for ordering of relations.
 
FromgetFrom () const
 Getter for the pointer to the from side object.
 
Weight getWeight () const
 Getter for the weight.
 
void setWeight (Weight weight)
 Setter for the weight.
 
const std::pair< From *, Weight > & getWeightedFrom () const
 Getter for the pointer to the weighted from side object.
 
TogetTo () const
 Getter for the pointer to the to side object.
 
WeightedRelation< To, Fromreversed () const
 Make a relation in the opposite direciton with the same weight.
 

Private Types

using Super = std::pair< std::pair< AFrom *, Weight >, ATo * >
 Type of the base class.
 

Friends

bool operator< (const std::pair< From *, Weight > &weightedPtr, const WeightedRelation< From, To > &weightedRelation)
 Operator to compare key type weighted item to the relations for assoziative lookups.
 
bool operator< (const WeightedRelation< From, To > &weightedRelation, const std::pair< From *, Weight > &weightedPtr)
 Operator to compare key type weighted item to the relations for assoziative lookups.
 
bool operator< (const From *ptrFrom, const WeightedRelation< From, To > &weightedRelation)
 Operator to compare key type item to the relations for assoziative lookups.
 
bool operator< (const WeightedRelation< From, To > &weightedRelation, const From *ptrFrom)
 Operator to compare key type item to the relations for assoziative lookups.
 

Detailed Description

template<class AFrom, class ATo = AFrom>
class Belle2::TrackFindingCDC::WeightedRelation< AFrom, ATo >

Type for two related objects with a weight.

Definition at line 26 of file WeightedRelation.h.


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