source:
src/FunctionApproximation/Subgraph/PotentialGraph.hpp@
ddb998
| Last change on this file since ddb998 was ddb998, checked in by , 9 years ago | |
|---|---|
|
|
| File size: 1.1 KB | |
| Rev | Line | |
|---|---|---|
| [6d08032] | 1 | /* |
| [ddb998] | 2 | * PotentialGraph.hpp |
| [6d08032] | 3 | * |
| 4 | * Created on: Oct 3, 2016 | |
| 5 | * Author: heber | |
| 6 | */ | |
| 7 | ||
| 8 | ||
| [ddb998] | 9 | #ifndef POTENTIALS_POTENTIALGRAPH_HPP_ |
| 10 | #define POTENTIALS_POTENTIALGRAPH_HPP_ | |
| [6d08032] | 11 | |
| 12 | // include config.h | |
| 13 | #ifdef HAVE_CONFIG_H | |
| 14 | #include <config.h> | |
| 15 | #endif | |
| 16 | ||
| 17 | #include <vector> | |
| 18 | ||
| [ddb998] | 19 | #include "FunctionApproximation/Subgraph/SubgraphEdge.hpp" |
| [6d08032] | 20 | |
| 21 | /** This class contains the specific definition of a subgraph that a specific | |
| 22 | * empirical potential models. Note that the graph is undirected. | |
| 23 | */ | |
| [ddb998] | 24 | class PotentialGraph |
| [6d08032] | 25 | { |
| 26 | public: | |
| 27 | ||
| [96af51] | 28 | //!> typedef for vector of edges |
| 29 | typedef std::vector<SubgraphEdge> edges_t; | |
| 30 | ||
| [ddb998] | 31 | /** Default cstor of class PotentialGraph. |
| [a14673] | 32 | * |
| 33 | */ | |
| [ddb998] | 34 | PotentialGraph() |
| [a14673] | 35 | {} |
| 36 | ||
| [ddb998] | 37 | /** Cstor of class PotentialGraph. |
| [91a3f7] | 38 | * |
| 39 | * \param _edges list of edges | |
| 40 | */ | |
| [ddb998] | 41 | PotentialGraph(const edges_t &_edges) : |
| [91a3f7] | 42 | edges(_edges) |
| 43 | {} | |
| 44 | ||
| [6d08032] | 45 | /** Adds an edge to the subgraph. |
| 46 | * | |
| 47 | *\param _edge edge to add | |
| 48 | */ | |
| 49 | void add_edge(const SubgraphEdge &_edge) | |
| 50 | { edges.push_back(_edge); } | |
| 51 | ||
| 52 | /** Const getter for the edge set of the subgraph. | |
| 53 | * | |
| 54 | */ | |
| 55 | const edges_t & getEdges() const | |
| 56 | { return edges; } | |
| 57 | ||
| 58 | private: | |
| 59 | edges_t edges; | |
| 60 | }; | |
| 61 | ||
| 62 | ||
| [ddb998] | 63 | #endif /* POTENTIALS_POTENTIALGRAPH_HPP_ */ |
Note:
See TracBrowser
for help on using the repository browser.
