Utilities
Utilities header only library
utils::Triplet< Type > Class Template Reference

Structure which holds three variables of same type. More...

Public Member Functions

 Triplet (Type val_1, Type val_2, Type val_3)
 
virtual void Set (Type val_1, Type val_2, Type val_3)
 Sets values.
 
virtual bool Contains (const Type value) const
 Checks if at least one of the three is equal to the value.
 
virtual Type & operator[] (size_t idx)
 Returns reference to the value by a specified index.
 
Type GetFirst () const
 Returns the first value.
 
void SetFirst (Type value)
 Sets the first value.
 
Type GetSecond () const
 Returns the second value.
 
void SetSecond (Type value)
 Sets the second value.
 
Type GetThird () const
 Returns the third value.
 
void SetThird (Type value)
 Sets the third value.
 
virtual bool operator== (const Triplet< Type > &obj) const
 Compares two triplets. The order of values is not important.
 
virtual bool operator!= (const Triplet< Type > &obj) const
 Compares two triplets. The order of values is not important.
 
Triplet & operator+= (const Type val)
 Increases all values by a specific amount.
 
Triplet & operator*= (const Type val)
 Multiples all values with a specific value.
 

Detailed Description

template<typename Type>
class utils::Triplet< Type >

Structure which holds three variables of same type.