Apache GraphAr C++ Library
The C++ Library for Apache GraphAr
Public Member Functions | List of all members
graphar::Edge Class Reference

Edge contains information of certain edge. More...

#include <graph_reader.h>

Public Member Functions

 Edge (AdjListArrowChunkReader &adj_list_reader, std::vector< AdjListPropertyArrowChunkReader > &property_readers)
 
IdType source () const noexcept
 Get source id of the edge. More...
 
IdType destination () const noexcept
 Get destination id of the edge. More...
 
template<typename T >
Result< T > property (const std::string &property) const
 Get the property value of the edge. More...
 
bool IsValid (const std::string &property) const
 Return true if value at the property is valid (not null). More...
 
template<>
Result< Dateproperty (const std::string &property) const
 

Detailed Description

Edge contains information of certain edge.

Definition at line 103 of file graph_reader.h.

Constructor & Destructor Documentation

◆ Edge()

graphar::Edge::Edge ( AdjListArrowChunkReader adj_list_reader,
std::vector< AdjListPropertyArrowChunkReader > &  property_readers 
)
explicit

Initialize the Edge.

Parameters
adj_list_readerThe reader for reading the adjList.
property_readersA set of readers for reading the edge properties.

Definition at line 172 of file graph_reader.cc.

Member Function Documentation

◆ destination()

IdType graphar::Edge::destination ( ) const
inlinenoexcept

Get destination id of the edge.

Returns
The id of the destination vertex.

Definition at line 127 of file graph_reader.h.

◆ IsValid()

bool graphar::Edge::IsValid ( const std::string &  property) const
inline

Return true if value at the property is valid (not null).

Parameters
propertyThe property name.
Returns
True if value at the property is valid, False otherwise.

Definition at line 144 of file graph_reader.h.

◆ property()

template<typename T >
Result< T > graphar::Edge::property ( const std::string &  property) const

Get the property value of the edge.

Parameters
propertyThe property name.
Returns
Result: The property value or error.

Definition at line 205 of file graph_reader.cc.

◆ source()

IdType graphar::Edge::source ( ) const
inlinenoexcept

Get source id of the edge.

Returns
The id of the source vertex.

Definition at line 120 of file graph_reader.h.


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