YAP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataPoint.h
Go to the documentation of this file.
1 /* YAP - Yet another PWA toolkit
2  Copyright 2015, Technische Universitaet Muenchen,
3  Authors: Daniel Greenwald, Johannes Rauch
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
20 
21 #ifndef yap_DataPoint_h
22 #define yap_DataPoint_h
23 
24 #include "fwd/DataAccessor.h"
25 
26 #include <string>
27 #include <vector>
28 
29 namespace yap {
30 
35 class DataPoint
36 {
37 public:
38 
41  DataPoint(const DataAccessorSet& dataAccessorSet);
42 
44  size_t nDataAccessors() const
45  { return Data_.size(); }
46 
49  size_t nSymIndices(unsigned i) const
50  { return Data_[i].size(); }
51 
55  size_t nElements(unsigned i, unsigned j = 0) const
56  { return Data_[i][j].size(); }
57 
59  unsigned bytes() const;
60 
62  friend bool equalStructure(const DataPoint& A, const DataPoint& B);
63 
65  friend bool operator==(const DataPoint& lhs, const DataPoint& rhs)
66  { return lhs.Data_ == rhs.Data_; }
67 
69  friend class CachedValue;
70 
71 private:
72 
77  std::vector<std::vector<std::vector<double> > > Data_;
78 
79 };
80 
81 
82 }
83 
84 #endif
size_t nElements(unsigned i, unsigned j=0) const
Definition: DataPoint.h:55
DataPoint(const DataAccessorSet &dataAccessorSet)
Definition: DataPoint.cxx:8
friend bool equalStructure(const DataPoint &A, const DataPoint &B)
check that two DataPoint's have same internal structure
Definition: DataPoint.cxx:16
size_t nDataAccessors() const
Definition: DataPoint.h:44
Class for holding data and cached values per data point for fast calculation.
Definition: DataPoint.h:35
std::vector< std::vector< std::vector< double > > > Data_
Definition: DataPoint.h:77
friend bool operator==(const DataPoint &lhs, const DataPoint &rhs)
check that two DataPoint's are equal
Definition: DataPoint.h:65
Class for managing cached values inside a DataPoint.
Definition: CachedValue.h:48
unsigned bytes() const
Definition: DataPoint.cxx:32
size_t nSymIndices(unsigned i) const
Definition: DataPoint.h:49