Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::Tuple2< E1, E2 > Class Template Reference

Tuples of two elements (2-tuples). More...

#include <ogdf/basic/tuples.h>

Public Member Functions

 Tuple2 ()
 Constructs a 2-tuple using default constructors.
 
 Tuple2 (const E1 &y1, const E2 &y2)
 Constructs a 2-tuple for given values.
 
 Tuple2 (const Tuple2< E1, E2 > &t2)
 Constructs a 2-tuple that is a copy of t2.
 
Tuple2operator= (const Tuple2< E1, E2 > &)=default
 
E1 & x1 ()
 Returns a reference the first element.
 
const E1 & x1 () const
 Returns a reference the first element.
 
E2 & x2 ()
 Returns a reference the second element.
 
const E2 & x2 () const
 Returns a reference the second element.
 

Public Attributes

E1 m_x1
 The first element.
 
E2 m_x2
 The second element.
 

Detailed Description

template<class E1, class E2>
class ogdf::Tuple2< E1, E2 >

Tuples of two elements (2-tuples).

Template Parameters
E1is the data type for the first element.
E2is the data type for the second element.

Definition at line 46 of file tuples.h.

Constructor & Destructor Documentation

◆ Tuple2() [1/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( )
inline

Constructs a 2-tuple using default constructors.

Definition at line 52 of file tuples.h.

◆ Tuple2() [2/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( const E1 &  y1,
const E2 &  y2 
)
inline

Constructs a 2-tuple for given values.

Definition at line 55 of file tuples.h.

◆ Tuple2() [3/3]

template<class E1 , class E2 >
ogdf::Tuple2< E1, E2 >::Tuple2 ( const Tuple2< E1, E2 > &  t2)
inline

Constructs a 2-tuple that is a copy of t2.

Definition at line 58 of file tuples.h.

Member Function Documentation

◆ operator=()

template<class E1 , class E2 >
Tuple2 & ogdf::Tuple2< E1, E2 >::operator= ( const Tuple2< E1, E2 > &  )
default

◆ x1() [1/2]

template<class E1 , class E2 >
E1 & ogdf::Tuple2< E1, E2 >::x1 ( )
inline

Returns a reference the first element.

Definition at line 67 of file tuples.h.

◆ x1() [2/2]

template<class E1 , class E2 >
const E1 & ogdf::Tuple2< E1, E2 >::x1 ( ) const
inline

Returns a reference the first element.

Definition at line 61 of file tuples.h.

◆ x2() [1/2]

template<class E1 , class E2 >
E2 & ogdf::Tuple2< E1, E2 >::x2 ( )
inline

Returns a reference the second element.

Definition at line 70 of file tuples.h.

◆ x2() [2/2]

template<class E1 , class E2 >
const E2 & ogdf::Tuple2< E1, E2 >::x2 ( ) const
inline

Returns a reference the second element.

Definition at line 64 of file tuples.h.

Member Data Documentation

◆ m_x1

template<class E1 , class E2 >
E1 ogdf::Tuple2< E1, E2 >::m_x1

The first element.

Definition at line 48 of file tuples.h.

◆ m_x2

template<class E1 , class E2 >
E2 ogdf::Tuple2< E1, E2 >::m_x2

The second element.

Definition at line 49 of file tuples.h.


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