RepastHPC  2.3.1
Public Types | Public Member Functions | List of all members
repast::RepastEdge< V > Class Template Reference

Default graph / network edge implementation. More...

#include <Edge.h>

Public Types

enum  MASTER_NODE { DEFAULT, SOURCE, TARGET }
 

Public Member Functions

 RepastEdge (V *source, V *target, MASTER_NODE useTargetAsMaster=DEFAULT)
 Creates a RepastEdge with the specified source and target and a default weight of 1. More...
 
 RepastEdge (V *source, V *target, double weight, MASTER_NODE useTargetAsMaster=DEFAULT)
 Creates a RepastEdge with the specified source, target, and weight. More...
 
 RepastEdge (boost::shared_ptr< V > source, boost::shared_ptr< V > target, MASTER_NODE useTargetAsMaster=DEFAULT)
 Creates a RepastEdge with the specified source and target and a default weight of 1. More...
 
 RepastEdge (boost::shared_ptr< V > source, boost::shared_ptr< V > target, double weight, MASTER_NODE useTargetAsMaster=DEFAULT)
 Creates a RepastEdge with the specified source, target, and weight. More...
 
 RepastEdge (const RepastEdge &edge)
 Copy constructor that creates a RepastEdge from another RepastEdge.
 
V * source () const
 Gets the source of this RepastEdge. More...
 
V * target () const
 Gets the target of this RepastEdge. More...
 
void target (V *target)
 
void source (V *source)
 
double weight () const
 Gets the weight of this RepastEdge. More...
 
void weight (double wt)
 
bool usesTargetAsMaster ()
 
void markConflicted ()
 
void clearConflicted ()
 
bool isConflicted ()
 

Detailed Description

template<typename V>
class repast::RepastEdge< V >

Default graph / network edge implementation.

Template Parameters
Vagent type that is the source and target of the edge

Constructor & Destructor Documentation

◆ RepastEdge() [1/4]

template<typename V >
repast::RepastEdge< V >::RepastEdge ( V *  source,
V *  target,
MASTER_NODE  useTargetAsMaster = DEFAULT 
)

Creates a RepastEdge with the specified source and target and a default weight of 1.

Parameters
sourcethe edge source
targetthe edge target

◆ RepastEdge() [2/4]

template<typename V >
repast::RepastEdge< V >::RepastEdge ( V *  source,
V *  target,
double  weight,
MASTER_NODE  useTargetAsMaster = DEFAULT 
)

Creates a RepastEdge with the specified source, target, and weight.

Parameters
sourcethe edge source
targetthe edge target
weightthe edge weight

◆ RepastEdge() [3/4]

template<typename V >
repast::RepastEdge< V >::RepastEdge ( boost::shared_ptr< V >  source,
boost::shared_ptr< V >  target,
MASTER_NODE  useTargetAsMaster = DEFAULT 
)

Creates a RepastEdge with the specified source and target and a default weight of 1.

Parameters
sourcethe edge source
targetthe edge target

◆ RepastEdge() [4/4]

template<typename V >
repast::RepastEdge< V >::RepastEdge ( boost::shared_ptr< V >  source,
boost::shared_ptr< V >  target,
double  weight,
MASTER_NODE  useTargetAsMaster = DEFAULT 
)

Creates a RepastEdge with the specified source, target, and weight.

Parameters
sourcethe edge source
targetthe edge target
weightthe edge weight

Member Function Documentation

◆ source()

template<typename V >
V* repast::RepastEdge< V >::source ( ) const
inline

Gets the source of this RepastEdge.

Returns
the source of this RepastEdge.

◆ target()

template<typename V >
V* repast::RepastEdge< V >::target ( ) const
inline

Gets the target of this RepastEdge.

Returns
the target of this RepastEdge.

◆ weight()

template<typename V >
double repast::RepastEdge< V >::weight ( ) const
inline

Gets the weight of this RepastEdge.

Returns
the weight of this RepastEdge.

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