fpmas 1.6
edge.h
Go to the documentation of this file.
1#ifndef FPMAS_EDGE_API_H
2#define FPMAS_EDGE_API_H
3
8namespace fpmas { namespace api { namespace graph {
9
13 typedef int LayerId;
14
20 template<typename _IdType, typename _NodeType>
21 class Edge {
22 public:
26 typedef _IdType IdType;
30 typedef _NodeType NodeType;
31
37 virtual IdType getId() const = 0;
38
51 virtual LayerId getLayer() const = 0;
52
62 virtual void setLayer(LayerId layer) = 0;
63
71 virtual float getWeight() const = 0;
72
78 virtual void setWeight(float weight) = 0;
79
85 virtual void setSourceNode(NodeType* const src) = 0;
86
92 virtual NodeType* getSourceNode() const = 0;
93
99 virtual void setTargetNode(NodeType* const tgt) = 0;
100
106 virtual NodeType* getTargetNode() const = 0;
107
108 virtual ~Edge() {};
109 };
110}}}
111#endif
Definition: edge.h:21
virtual IdType getId() const =0
virtual LayerId getLayer() const =0
virtual void setTargetNode(NodeType *const tgt)=0
virtual void setLayer(LayerId layer)=0
_NodeType NodeType
Definition: edge.h:30
virtual void setSourceNode(NodeType *const src)=0
virtual NodeType * getSourceNode() const =0
virtual void setWeight(float weight)=0
virtual NodeType * getTargetNode() const =0
_IdType IdType
Definition: edge.h:26
virtual float getWeight() const =0
int LayerId
Definition: edge.h:13
Definition: fpmas.cpp:3