Easy3D 2.6.1
Loading...
Searching...
No Matches
Graph::EdgeProperty< T > Class Template Reference

Edge property of type T. More...

#include <graph.h>

Inheritance diagram for Graph::EdgeProperty< T >:
Property< T >

Public Member Functions

 EdgeProperty ()=default
 Default constructor.
 
 EdgeProperty (Property< T > p)
 Constructor with a property.
 
Property< T >::reference operator[] (Edge e)
 Access the data stored for edge e.
 
Property< T >::const_reference operator[] (Edge e) const
 Access the data stored for edge e.
 
- Public Member Functions inherited from Property< T >
 Property (PropertyArray< T > *p=nullptr)
 Constructor.
 
virtual ~Property ()=default
 Destructor.
 
void reset ()
 Resets the property.
 
 operator bool () const
 Checks if the property is valid.
 
virtual reference operator[] (size_t i)
 Accesses the i-th element.
 
virtual const_reference operator[] (size_t i) const
 Const access to the i-th element.
 
const T * data () const
 Gets a pointer to the array.
 
std::vector< T > & vector ()
 Gets a reference to the underlying vector.
 
const std::vector< T > & vector () const
 Const access to the underlying vector.
 
PropertyArray< T > & array ()
 Gets a reference to the property array.
 
const PropertyArray< T > & array () const
 Const access to the property array.
 
const std::string & name () const
 Returns the name of the property.
 
void set_name (const std::string &n)
 Sets the name of the property.
 

Additional Inherited Members

- Public Types inherited from Property< T >
typedef PropertyArray< T >::reference reference
 The reference type of the property.
 
typedef PropertyArray< T >::const_reference const_reference
 The const reference type of the property.
 

Detailed Description

template<class T>
class easy3d::Graph::EdgeProperty< T >

Edge property of type T.

Template Parameters
TThe type of the property.
See also
VertexProperty

Constructor & Destructor Documentation

◆ EdgeProperty()

template<class T>
EdgeProperty ( Property< T > p)
inlineexplicit

Constructor with a property.

Parameters
pThe property.

Member Function Documentation

◆ operator[]() [1/2]

template<class T>
Property< T >::reference operator[] ( Edge e)
inline

Access the data stored for edge e.

Parameters
eThe edge.
Returns
A reference to the data stored for the edge.

◆ operator[]() [2/2]

template<class T>
Property< T >::const_reference operator[] ( Edge e) const
inline

Access the data stored for edge e.

Parameters
eThe edge.
Returns
A const reference to the data stored for the edge.

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