OpenMPCD
include
OpenMPCD
Graph4D.hpp
Go to the documentation of this file.
1
/**
2
* @file
3
* Defines the Graph4D class.
4
*/
5
6
#ifndef OPENMPCD_GRAPH4D_HPP
7
#define OPENMPCD_GRAPH4D_HPP
8
9
#include <
OpenMPCD/Types.hpp
>
10
11
#include <boost/tuple/tuple.hpp>
12
#include <deque>
13
#include <string>
14
15
namespace
OpenMPCD
16
{
17
/**
18
* Represents a 4D graph.
19
*/
20
class
Graph4D
21
{
22
public
:
23
typedef
std::deque<boost::tuple<double, double, double, double> >
Container
;
24
///< The type the data points are collected in.
25
26
public
:
27
/**
28
* Adds a data point.
29
* @param[in] w The w coordinate.
30
* @param[in] x The x coordinate.
31
* @param[in] y The y coordinate.
32
* @param[in] z The z coordinate.
33
*/
34
void
addPoint
(
const
FP
w,
const
FP
x,
const
FP
y,
const
FP
z)
35
{
36
points.push_back(boost::make_tuple(w, x, y, z));
37
}
38
39
/**
40
* Returns the data points.
41
*/
42
const
Container
&
getPoints
()
const
43
{
44
return
points;
45
}
46
47
/**
48
* Saves the graph data to the given file path.
49
* @param[in] path The file path to save to.
50
*/
51
void
save
(
const
std::string& path)
const
;
52
53
private
:
54
Container
points;
///< The data points.
55
};
56
}
57
58
#endif
OpenMPCD::Graph4D::addPoint
void addPoint(const FP w, const FP x, const FP y, const FP z)
Adds a data point.
Definition:
Graph4D.hpp:34
OpenMPCD::FP
double FP
Default floating point type.
Definition:
Types.hpp:13
Types.hpp
OpenMPCD::Graph4D::save
void save(const std::string &path) const
Saves the graph data to the given file path.
Definition:
Graph4D.cpp:6
OpenMPCD::Graph4D
Represents a 4D graph.
Definition:
Graph4D.hpp:20
OpenMPCD::Graph4D::Container
std::deque< boost::tuple< double, double, double, double > > Container
The type the data points are collected in.
Definition:
Graph4D.hpp:23
OpenMPCD::Graph4D::getPoints
const Container & getPoints() const
Returns the data points.
Definition:
Graph4D.hpp:42
Generated by
1.8.17