OdinAI

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List

All Classes Namespaces Functions Variables
GraphEdges.h
1 /*******************************************************************************
2 * ________ .___.__ _____ .___
3 * \_____ \ __| _/|__| ____ / _ \ | |
4 * / | \ / __ | | |/ \ / /_\ \| |
5 * / | \/ /_/ | | | | \/ | \ |
6 * \_______ /\____ | |__|___| /\____|__ /___|
7 * \/ \/ \/ \/
8 *
9 * Copyright (c) Emil Sandstø 2012
10 *******************************************************************************/
11 #ifndef ODINAI_GRAPH_EDGES_H_
12 #define ODINAI_GRAPH_EDGES_H_
13
14 namespace OdinAI
15 {
22 class GraphEdge
23 {
24 public:
25 GraphEdge() : m_from(0), m_to(0), m_cost(1) {}
26 GraphEdge(int from, int to) : m_from(from), m_to(to), m_cost(1) {}
27 GraphEdge(int from, int to, int cost) : m_from(from), m_to(to), m_cost(cost) {}
28
29 virtual ~GraphEdge() {}
30
31 int From() const;
32 void SetFrom(int from);
33
34 int To() const;
35 void SetTo(int to);
36
37 int Cost() const;
38 void SetCost(int cost);
39 protected:
40 int m_from;
41 int m_to;
42 int m_cost;
43 };
44 }
45 #endif
OdinAI::GraphEdge::m_cost
int m_cost
How much does it cost to traverse edge?
Definition: GraphEdges.h:42
OdinAI::GraphEdge::m_to
int m_to
To which node?
Definition: GraphEdges.h:41
OdinAI::GraphEdge::m_from
int m_from
From which node?
Definition: GraphEdges.h:40
OdinAI::GraphEdge
Definition: GraphEdges.h:22