Belle II Software development
|
Type for two related objects with a weight. More...
#include <WeightedRelation.h>
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. | |
From * | getFrom () 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. | |
To * | getTo () const |
Getter for the pointer to the to side object. | |
WeightedRelation< To, From > | reversed () const |
Make a relation in the opposite direction 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 associative 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 associative lookups. | |
bool | operator< (const From *ptrFrom, const WeightedRelation< From, To > &weightedRelation) |
Operator to compare key type item to the relations for associative lookups. | |
bool | operator< (const WeightedRelation< From, To > &weightedRelation, const From *ptrFrom) |
Operator to compare key type item to the relations for associative lookups. | |
Type for two related objects with a weight.
Definition at line 26 of file WeightedRelation.h.
using From = AFrom |
Type of from which the relation originates.
Definition at line 33 of file WeightedRelation.h.
|
private |
Type of the base class.
Definition at line 29 of file WeightedRelation.h.
using To = ATo |
Type of to which the relation points.
Definition at line 36 of file WeightedRelation.h.
|
inline |
Creating a relation with one object on the from side, one on the to side and a weight.
Definition at line 43 of file WeightedRelation.h.
|
inline |
Getter for the pointer to the from side object.
Definition at line 91 of file WeightedRelation.h.
|
inline |
Getter for the pointer to the to side object.
Definition at line 115 of file WeightedRelation.h.
|
inline |
Getter for the weight.
Definition at line 97 of file WeightedRelation.h.
|
inline |
Getter for the pointer to the weighted from side object.
Definition at line 109 of file WeightedRelation.h.
|
inline |
Operator for ordering of relations.
Definition at line 48 of file WeightedRelation.h.
|
inline |
Make a relation in the opposite direction with the same weight.
Definition at line 121 of file WeightedRelation.h.
|
inline |
Setter for the weight.
Definition at line 103 of file WeightedRelation.h.
|
friend |
Operator to compare key type item to the relations for associative lookups.
Definition at line 79 of file WeightedRelation.h.
|
friend |
Operator to compare key type weighted item to the relations for associative lookups.
Definition at line 59 of file WeightedRelation.h.
|
friend |
Operator to compare key type item to the relations for associative lookups.
Definition at line 85 of file WeightedRelation.h.
|
friend |
Operator to compare key type weighted item to the relations for associative lookups.
Definition at line 69 of file WeightedRelation.h.